How to add httpd.conf to XAMPP

I was reading “Practical web 2.0″ by Quentin Zervaas. In chapater 2 there is a section which adds httpd.conf to folder.
I struggled a bit but I made it finally. This is how.

My directory structure is like this.

-hdocs
    -phpweb20
       -data
       -htdocs
       -include
       -templates
       -httpd.conf

I added the following to httpd.conf

<VirtualHost *:80>
ServerName phpweb20
DocumentRoot "c:/xampp/htdocs/phpweb20/htdocs"
<Directory "c:/xampp/htdocs/phpweb20/htdocs">
AllowOverride None
Options All
</Directory>
php_value include_path ".;c:/xampp/htdocs/phpweb20/include;c:/xampp/php/pear"
php_value magic_quotes_gpc off
php_value register_globals off
</VirtualHost>

I also added the following to C:\xampp\apache\conf\httpd.conf

# For phpweb20 config
Include "C:/xampp/htdocs/phpweb20/httpd.conf"

And restart apache.

1 comment to How to add httpd.conf to XAMPP

  • Please do I know the usages and utility of httpd.conf file. I have another question, in shared hosting I have no access to php.ini file. Then how should I enable or disable php components like curl apc etc.
    Thanks a lot for your valuable tutorials, they are helping us a lot.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>