View previous topic :: View next topic |
Author |
Message |
lnthai2002 Apprentice
Joined: 04 Nov 2005 Posts: 260
|
Posted: Sat Jun 02, 2007 1:19 pm Post subject: need help to config apache |
|
|
Hi,
I have a course in web programming so i need to setup a php web server. I did emerge apache but when i follow the instruction on apache website to config /etc/apache/httpd.conf , I can not find DocumentRoot. As far as i know, config apache only require modifying the DocumentRoot and php module. Does the gentoo apache use other directive for DocumentRoot in /etc/apache/httpd.conf ? My assignment dues next week so i would appreciated if anyone can help me setup the webserver asap.
Thai |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Jun 02, 2007 1:22 pm Post subject: Re: need help to config apache |
|
|
lnthai2002 wrote: | Hi,
I have a course in web programming so i need to setup a php web server. I did emerge apache but when i follow the instruction on apache website to config /etc/apache/httpd.conf , I can not find DocumentRoot. As far as i know, config apache only require modifying the DocumentRoot and php module. Does the gentoo apache use other directive for DocumentRoot in /etc/apache/httpd.conf ? My assignment dues next week so i would appreciated if anyone can help me setup the webserver asap.
Thai |
Code: |
$ grep DocumentRoot /etc/apache2/vhosts.d/00_default_vhost.conf
DocumentRoot "/storage/www"
|
At some moment, this was moved to vhost, so it is now easy to create multiple vhosts out of an apache server. |
|
Back to top |
|
|
lnthai2002 Apprentice
Joined: 04 Nov 2005 Posts: 260
|
Posted: Sun Jun 03, 2007 1:01 pm Post subject: |
|
|
Thanks for your info. Now I have another problem when I start apache, I get the following error:
apache2: could not determine the server's fully qualified domain name, using 127.0.0.1 for Servername
How can I fix it? I did have a resolve hostname in /etc/hosts why cant apache use it?
Thai |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sun Jun 03, 2007 1:08 pm Post subject: |
|
|
lnthai2002 wrote: | Thanks for your info. Now I have another problem when I start apache, I get the following error:
apache2: could not determine the server's fully qualified domain name, using 127.0.0.1 for Servername
How can I fix it? I did have a resolve hostname in /etc/hosts why cant apache use it?
Thai |
If you have a server name in /etc/hosts, try using it in the same file that you changed the DocumentRoot:
Code: |
<VirtualHost *:80>
ServerName box.yourdomain.com
ServerAdmin root@box.yourdomain.com
DocumentRoot "/whatever"
|
|
|
Back to top |
|
|
|