Apache Outta the Box - Am I on Glue?
I am a complete noob to Apache, so I apologize for what may be very obvious to some of you. That's why I'm here to ask for help :)
Slackware 11.0 with Apache defaults. I can't access webpages remotely but I can right from the server itself. I'm guessing I need to modify httpd.conf and add the particular Directory I want to allow all to access to? Is the default permissions to basically deny all access to all folders under htdocs? I could use .htaccess, but people seem to recommend against those files..? For example, just for testing I want to access the "manual". I can using localhost, but not from another workstation. I get server not found in Firefox. I think i'm on the right track, just looking for a couple tips and/or confirmation. Much appreciated. Thanks! |
Do you have a router or firewall between the machines that would block access to port 80?
Not sure about trying to access the manual from a remote machine, but have you tried just accessing the default index.html page in htdocs from the remote machine? |
Quote:
No router/firewall. I can telnet to port 80 fine. I have tried accessing the default page as well. |
I'm no expert, but
try running (as root on the server) netstat -apNlt you should see something like Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN 3638/httpd if you do, and there is definitely no firewall messing things up, then double check that your are entering the correct address on the remote browser. I think if the problem was access permission you would get permission denied, whereas if you are getting 'server not found', then its more likely you are trying to connect to the wrong address. tobyl |
Quote:
|
Quote:
Brian |
Quote:
|
And who is the user that runs apache?
Still if it would have been a permission error, the error message wouldn't be server not found but access denied. Are you 10000% sure you input the right address? http://IP/subDir/document.html? |
Quote:
The webserver runs with a user/group defined in httpd.conf. It is usually something like "apache" or "nobody" or "httpd". "grep User httpd.conf" will show you the current setting. Personally, I usually set all my web files to be owned by the web server user and remove global permissions. You should not have to explicitly give permission in httpd.conf for subdirectories as long as they are readable by the web server user. Brian |
in my default httpd.conf user and group are set to daemon
Fresh install never modified. So I would bet my hand he has it the same. |
Quote:
Thanks! |
Quote:
Brian |
Yes you don't need to input index.html into the URL.
One instance for root is because you were logged in as root when you ran /etc/rc.d/rc.httpd start and the other are nobody because it is set so in httpd.conf That is normal. But I still wouldn't belive that this is the problem with file permissions because you would not get a server not found error in the browser. Although just to be sure, make clear that they are all publicly readable. Go to the dir that contains htdocs and run chmod -R 664 htdocs/ Witch will make all files and directories as read-write for file owner, same for file owner group and make it read-only for others, witch is then publicly readable. And then you still need to fix that dirs are marked as executable witch you do with: chmod +x htdocs and do the same for all directoryes in htdocs a.s.o. |
Quote:
Brian |
Thanks guys, I will double-check all those things this evening.
So to confirm, I shouldn't need to specify any new sub-dirs of htdocs in the httpd.conf file? Thanks! |
All times are GMT -5. The time now is 06:42 AM. |