Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need help to config apache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lnthai2002
Apprentice
Apprentice


Joined: 04 Nov 2005
Posts: 260

PostPosted: Sat Jun 02, 2007 1:19 pm    Post subject: need help to config apache Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Jun 02, 2007 1:22 pm    Post subject: Re: need help to config apache Reply with quote

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
View user's profile Send private message
lnthai2002
Apprentice
Apprentice


Joined: 04 Nov 2005
Posts: 260

PostPosted: Sun Jun 03, 2007 1:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun Jun 03, 2007 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum