How to add Include to C:\xampp\apache\conf\httpd.conf

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to add Include to C:\xampp\apache\conf\httpd.conf

Postby shinokada » 12. September 2009 17:00

I want to include the following. But it does not work. How can I do it?

Include htdocs/phpweb20/httpd.conf

In Linux, it is like this.

Include /var/www/phpweb20/httpd.conf

Thanks in advance.
shinokada
 
Posts: 20
Joined: 19. February 2009 16:19

Re: How to add Include to C:\xampp\apache\conf\httpd.conf

Postby dmphotography » 12. September 2009 17:09

Include "C:/xampp/htdocs/phpweb20/httpd.conf"

But this isn't a good idea or good practice for that matter.
You should NEVER have configuration files in your htdocs folder. I recommend putting it in any folder before htdocs. In XAMPP, the ideal place would be xampp/apache/conf/extra .

The second issue is why are you including a second file named httpd.conf?
Why not either change the values in /xampp/apache/conf/httpd.conf to match the file you're trying to include or add the values that don't already exist in the default httpd.conf to the existing one?
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7

Re: How to add Include to C:\xampp\apache\conf\httpd.conf

Postby shinokada » 12. September 2009 17:14

I am trying to add the following to httpd.conf.

Code: Select all
<VirtualHost 192.168.0.80>
    ServerName phpweb20
    DocumentRoot C:\xampp\htdocs\phpweb20

    <Directory "C:\xampp\htdocs\phpweb20">
        AllowOverride All
        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>
shinokada
 
Posts: 20
Joined: 19. February 2009 16:19

Re: How to add Include to C:\xampp\apache\conf\httpd.conf

Postby dmphotography » 12. September 2009 17:51

shinokada wrote:I am trying to add the following to httpd.conf.

Code: Select all
<VirtualHost 192.168.0.80>
    ServerName phpweb20
    DocumentRoot C:\xampp\htdocs\phpweb20

    <Directory "C:\xampp\htdocs\phpweb20">
        AllowOverride All
        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>


That's not where you add that. Open up /xampp/apache/conf/extra/httpd-vhosts.conf and it goes there.
You also need to try writing it more like this:
Code: Select all
<VirtualHost *:80>
    ServerName phpweb20
    DocumentRoot C:\xampp\htdocs\phpweb20
    <Directory "C:\xampp\htdocs\phpweb20">
        AllowOverride All
        Options All
    </Directory>
</VirtualHost>


The additional values you set are not necessary.

php_value magic_quotes_gpc off
php_value register_globals off

These are already set to off by default in XAMPP. You can find them in /xampp/php/php.ini .

I hope that helps.
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 139 guests