Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
10-23-2009, 07:17 AM
|
#1
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Rep:
|
can't access local server (slackware 12.2)
on my slackware 12.2 box I can't access local server.
I was able to in the past and I haven't modified the config
files lately (http.conf, ...).
The exit code of
Code:
/etc/rc.d/rc.httpd start
is 0.
The file
Code:
/var/log/httpd/error_log
doesn't report any errors.
And yet when I try to go to any of these addresses
Code:
http://localhost/
http://127.0.0.1/
http://127.0.0.1:80/
in my browser, it takes for ever to load and eventually I'd get an error page:
...
Could not connect to remote server
...
Have I missed something on my checklist?
|
|
|
|
10-23-2009, 07:22 AM
|
#2
|
|
Member
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 667
Rep:
|
Quote:
Originally Posted by vonbiber
on my slackware 12.2 box I can't access local server.
I was able to in the past and I haven't modified the config
files lately (http.conf, ...).
The exit code of
Code:
/etc/rc.d/rc.httpd start
is 0.
The file
Code:
/var/log/httpd/error_log
doesn't report any errors.
And yet when I try to go to any of these addresses
Code:
http://localhost/
http://127.0.0.1/
http://127.0.0.1:80/
in my browser, it takes for ever to load and eventually I'd get an error page:
...
Could not connect to remote server
...
Have I missed something on my checklist?
|
What do you get when you run this command:
Code:
ps -ef | grep httpd
|
|
|
|
10-23-2009, 08:12 AM
|
#3
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Code:
# ps -ef | grep httpd
root 2597 1 0 15:12 ? 00:00:00 /usr/sbin/httpd -k start
apache 2598 2597 0 15:12 ? 00:00:00 /usr/sbin/httpd -k start
apache 2600 2597 0 15:12 ? 00:00:00 /usr/sbin/httpd -k start
apache 2601 2597 0 15:12 ? 00:00:00 /usr/sbin/httpd -k start
apache 2602 2597 0 15:12 ? 00:00:00 /usr/sbin/httpd -k start
apache 2603 2597 0 15:12 ? 00:00:00 /usr/sbin/httpd -k start
root 2605 2590 0 15:12 pts/2 00:00:00 grep httpd
|
|
|
|
10-23-2009, 09:13 AM
|
#4
|
|
Member
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 667
Rep:
|
Take a look at /var/www/htdocs and make sure you still have an index.html file. Sometimes, it gets replaced during upgrades.
|
|
|
|
10-23-2009, 09:30 AM
|
#5
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Quote:
Originally Posted by stormtracknole
Take a look at /var/www/htdocs and make sure you still have an index.html file. Sometimes, it gets replaced during upgrades.
|
no, it's still there.
besides if it were missing I'd get the contents of the directory
but no error message
Before that I tried some php pages that I wrote and I know
that php is working because
displayed phpinfo contents
|
|
|
|
10-23-2009, 09:44 AM
|
#6
|
|
Member
Registered: Aug 2006
Distribution: Slackware
Posts: 763
Rep:
|
What kind of firewall rules do you have in place?
|
|
|
|
10-23-2009, 10:37 AM
|
#7
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Quote:
Originally Posted by manwichmakesameal
What kind of firewall rules do you have in place?
|
I never touched these. I kept the default settings that came with
the slackware installation.
So I guess there are none.
|
|
|
|
10-23-2009, 06:38 PM
|
#8
|
|
Slackware Contributor
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 980
|
Will show any errors in your config.
Code:
netstat -ltp| fgrep http
Will show you if you have a http server listening on a port.
Did you specify a "Listen" directive in your httpd.conf?
The Default is "Listen 80"
If you bind the httpd server to a specific ip address then it won't listen on localhost unless told to do so.
|
|
|
|
10-24-2009, 05:36 AM
|
#9
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Quote:
Originally Posted by mRgOBLIN
Will show any errors in your config.
|
I already ran that command. There are no syntax errors in the config.
Quote:
Code:
netstat -ltp| fgrep http
Will show you if you have a http server listening on a port.
|
I'll try that later. Right now httpd is not running.
Quote:
Did you specify a "Listen" directive in your httpd.conf?
The Default is "Listen 80"
If you bind the httpd server to a specific ip address then it won't listen on localhost unless told to do so.
|
I didn't change the original settings and in my browser
even
Code:
http://127.0.0.1:80/
didn't work
And, by the way, I don't have that issue with slax
(with xampp).
|
|
|
|
10-24-2009, 07:56 AM
|
#10
|
|
Slackware Contributor
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 980
|
Not running through a proxy of any kind?
|
|
|
|
10-24-2009, 08:12 AM
|
#11
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Quote:
Originally Posted by mRgOBLIN
Not running through a proxy of any kind?
|
nope
|
|
|
|
10-24-2009, 09:13 AM
|
#12
|
|
Member
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 667
Rep:
|
Just for the heck of it, type this as root:
and post the results.
Also, on your httpd.conf file, look for this section (ServerName www.example.com:80) to see what it says.
Last, but not least, take a look at /etc/hosts.allow and /etc/hosts.deny to make sure that nothing there is being block.
|
|
|
|
10-25-2009, 06:15 AM
|
#13
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Quote:
Originally Posted by stormtracknole
Just for the heck of it, type this as root:
and post the results.
|
Code:
# iptables -nvL
FATAL: Module ip_tables not found.
iptables v1.4.2: can't initialize iptables table `filter': iptables who
? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Quote:
|
Also, on your httpd.conf file, look for this section (ServerName www.example.com:80) to see what it says.
|
Here's what I have
Code:
#
#ServerName www.example.com:80
ServerName 127.0.0.1:80
#
Quote:
|
Last, but not least, take a look at /etc/hosts.allow and /etc/hosts.deny to make sure that nothing there is being block.
|
There's nothing in there, just comments
@mRgOBLIN
Code:
# netstat -ltp | fgrep http
tcp 0 0 *:http *:* LISTEN 2221/httpd
|
|
|
|
10-25-2009, 01:00 PM
|
#14
|
|
Member
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 667
Rep:
|
The iptables command needs to be done as root. I doubt this is the problem though. Go ahead and comment out the ServerName section. I don't think it is necessary to manually put in 127.0.0.1 in there. Once you make the change, go ahead and restart the service:
Code:
/etc/rc.d/rc.httpd restart
|
|
|
|
10-27-2009, 05:04 AM
|
#15
|
|
Member
Registered: Apr 2009
Distribution: slackware
Posts: 292
Original Poster
Rep:
|
Thanks for the suggestion about /etc/httpd/httpd.conf
I commented out the ServerName line and restarted apache
and that did the trick
However every time the daemon would start I'd get this message
Code:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
So I thought I would put this line instead
Code:
ServerName localhost
It worked and this time I didn't get the annoying message.
Again, thanks a lot to everybody who tried to help
Quote:
Originally Posted by stormtracknole
The iptables command needs to be done as root.
|
I ran all the commands as root
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:55 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|