View Full Version : APACHE problem
jeesan
2008-08-25, 12:43 AM CDT
Hi,
I m new in this Forum . I m facing problem with HTTP in fedora 8 . When I m putting http://10.32.XX.XX , its not browsing index.html default path page without mentioning port 80. I have tried with another linux versions , when put http://10.32.XX.XX . It will automatically browsing default index page . But when i m trying with Fedora 8 ,,, have to put http://10.32.XX.XX:80 . Is any other configuration needs for HTTP.
I have no DNS , No firewall , No SeLinux.
jayanatl
2008-08-25, 01:41 AM CDT
Please Brief how you configured your http server / cat your configuration file so that i can analyze
jeesan
2008-08-25, 02:19 AM CDT
Listen 10.32.XX.XX:80
ServerName system:80 (NO DNS is there)
NameVirtualHost 10.32.XX.XX:80
<VirtualHost 10.32.XX.XX:80>
ServerAdmin root@system
DocumentRoot /var/www/html
ServerName system
ErrorLog logs/system-error_log
CustomLog logs/system-access_log common
</VirtualHost>
.................................................. .................................................. ...............
Even I tried with IP address insteed of hostname. Even 127.0.0.1 ....... same have to do http://127.0.0.1:80
jayanatl
2008-08-25, 03:58 AM CDT
Change your setting to reflect like this : -
Listen 10.32.XX.XX:80 --> Listen 10.32.XX.XX:80
ServerName system:80 (NO DNS is there) --> #ServerName system:80 (comment this line)
NameVirtualHost 10.32.XX.XX:80 --> NameVirtualHost *:80
<VirtualHost 10.32.XX.XX:80> --> VirtualHost <sitename.com>:80
ServerAdmin root@system -- > same
DocumentRoot /var/www/html --> same
ServerName system --> same
ErrorLog logs/system-error_log--> same
CustomLog logs/system-access_log common--> same
</VirtualHost> --> same
try like that
issue the command httpd -t (to check the syntax, check if there is any warning)
and restart / reload httpd service
try this way .... and revert any feedback ....
jeesan
2008-08-25, 04:33 AM CDT
Thanks for reply . But sorry friend it's not done . While hashing 'ServerName' it's showing following error :->
httpd: Could not reliably determine the server's fully qualified domain name, using 192.XXX.XXX.XXX for ServerName
And according to your post I tried , but have to put port number alongwith IP.
jeesan
2008-08-26, 03:09 AM CDT
Any help..............
briantan
2008-08-26, 09:16 AM CDT
This works for me. ("system" should be the first virtual host entry)
Listen 80
ServerName system:80 (NO DNS is there)
NameVirtualHost *:80
<VirtualHost *:80>
ServerName system
ServerAdmin root@system
DocumentRoot /var/www/html
ServerName system
ErrorLog logs/system-error_log
CustomLog logs/system-access_log common
</VirtualHost>
Optionally, add system entry in /etc/hosts file, to access url by host name.
10.32.xx.xx system
Access via url http://10.32.xx.xx
ValHolla
2008-08-27, 08:50 PM CDT
if you add/change the hostname in /etc/hosts to something like:
10.32.xx.xx system system.
note the trailing "dot" after the second system. this "tricks" the system into thinking it is fully qualified. you could always give it an actual domain name... i.e. system.home.net or something similar if it is private internal.
JohnVV
2008-08-27, 10:09 PM CDT
i was about to say something about " Listen " but briantan did
However i am wondering why you are using "VirtualHost" for a site on port 80 ( the default port) vhost should NOT be needed for 80 .For 8080 yes but not 80 .
jeesan
2008-08-29, 04:39 AM CDT
I m using fedora version. But problem is I m unable to browse / access any subfolder inside of /var/www/html . Whereas no problem with browsing any index page. I have tried with file permission or virtual hosting tag.
Firewall & SELINUX both off. Firewall & SELINUX both off. Its showing access denied / forbidden or some times blank page.
Wayne
2008-08-29, 04:42 AM CDT
Threads merged...
jeesan
2008-08-29, 05:20 AM CDT
Error is :->>>>
Forbidden
You don't have permission to access /abcd on this server.
Apache/XXX (Fedora) Server at 192.XXX.XXX.XXX Port 80
.....But folder has full permission. IF browse index.html page in this folder , then no problem is there.
briantan
2008-08-29, 06:43 AM CDT
To allow browsing of directory, add Indexes option to <Directory> section.
<VirtualHost *:80>
ServerName system
DocumentRoot /var/www/html
......
<Directory /var/www/html>
Options FollowSymLinks Includes Indexes
AllowOverride All
order allow,deny
allow from all
</Directory>
</VirtualHost>
jeesan
2008-08-29, 07:40 AM CDT
Thanks for reply....But nothing is showing when I m trying to browse like http://192.XXX.XXX.XXX/abcd or http://192.XXX.XXX.XXX/abcd/ or http://192.XXX.XXX.XXX:80/abcd.
Its showing same error ->
Forbidden
You don't have permission to access /abcd on this server.
Apache/XXX (Fedora) Server at 192.XXX.XXX.XXX Port 80
briantan
2008-08-29, 09:29 AM CDT
Have you added the <Directory> directive with Indexes option as my post #13?
Is abcd a subdirectory of /var/www/html? If so, the <Directory> would take care of it too.
If not, you have to add another <Directory> for abcd. Or symlink abcd to /var/www/html.
jeesan
2008-08-30, 01:16 AM CDT
I have tried both.....but can't understand what is problem
JohnVV
2008-08-30, 02:16 AM CDT
i would get rid of the vhost code .It is not needed for port 80
<VirtualHost *:80>
</VirtualHost>
and just use the normal <Directory /var/www/html>
near the top of httpd.conf
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.