LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-09-2010, 07:28 AM   #1
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Rep: Reputation: 2
Acess apache remotely on slackware 13.1


I have installed apache on slackware (I was isntalled slackware without apache) and "It Works" but when I try to access it remotely it returns "404 error". Apache server work pretty well localy either for localhost or IP adress.


thaks by any kind of help.
 
Old 11-09-2010, 07:51 AM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Check in /etc/httpd/httpd.conf that the Document root directory is set to 'Allow from all'. The Document root dir is usually /srv/www/htdocs, and below that declaration is a clause that looks like this:

Code:
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/srv/httpd/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>
Make sure the next to last line is 'Allow from all'
 
Old 11-09-2010, 08:22 AM   #3
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
No Mr. Udaman, my httpd.conf is with "allow for all" opition and without no coment (#).
I was thinking about a firewall but I do not have no firewall in use here, iptables is empty.

Thanks
 
Old 11-10-2010, 07:08 AM   #4
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
up

Anybody know about system policies menu on KDE4 i was reading about and it look like a filter or something like a firewall. How I disable it and how can I know what file it is making changes?
 
Old 11-10-2010, 07:13 AM   #5
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Hi

Not sure what the problem is, but error 404 means the web server can't find the file you are asking it for. If there was a firewall problem, you wouldn't get contact with the web server at all. Or maybe you reached a different server?
 
Old 11-10-2010, 09:39 AM   #6
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
Mr. Guttorm, I can access the same page (index.html of server) locally but when a try to access the page from another computer it return time out (and in some browsers it is recognized as error 404). Sorry if I had bad explained my problem.

Thanks
 
Old 11-11-2010, 07:34 AM   #7
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
up
I'm really stuck!
No search returns great results but I think it is not hard this look like a simple thing but I can not to solve AAAAA!!!
 
Old 11-11-2010, 11:28 AM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
It could be a number of things. Have you looked in the Apache logs (/var/log/httpd)? Look in both the access_log and the error_log. That should give you some clues as to what is happening.
 
Old 11-11-2010, 01:44 PM   #9
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
let me explain it better, the Internet Explorer said error 404 but it is not error 404 the browser do not connect with the server. The log's are empty only irrelevant info. I turn on the httpd and it works but only locally if I try to connect from another computer the computer can not connect to the server.
 
Old 11-11-2010, 02:04 PM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
I try to connect from another computer the computer can not connect to the server.
When you say you can't connect from another computer, is that computer on the same network/LAN as the server or is it outside of your network? A description of your network setup might help. Also in your first post you said:

Quote:
Originally Posted by Willian
Apache server work pretty well localy either for localhost or IP adress.
By IP address, do you mean a regualr IP address or the local IP address (127.0.0.1)? How are you trying to connect when you get the 404? IP address or name?
 
Old 11-11-2010, 04:55 PM   #11
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
Internet no network. I'm trying to make a http server but no one can not open the pages and is not error 404, is timeout.
 
Old 11-11-2010, 05:07 PM   #12
LyCC
LQ Newbie
 
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by Willian View Post
I have installed apache on slackware (I was isntalled slackware without apache) and "It Works" but when I try to access it remotely it returns "404 error". Apache server work pretty well localy either for localhost or IP adress.
- if here you mean by 404, timeout and the page can't be opened (and the 404 is not returned by apache), then

Try:

Listen 80
or
Listen 1.2.3.4:80 (your ip there)

I mean if apache is listening on the external IP ...
PS: if you are behind a router, you need to configure port forwarding. Also make sure the firewall allows the http connection.

PS: Also check the /var/logs/httpd/error_log or access_log, to see if any request is comming in from the remote computer at all. If not, there is nothing wrong with your apache, something is not letting the outside computers connect in, like router, etc ...

Last edited by LyCC; 11-11-2010 at 05:13 PM.
 
Old 11-11-2010, 05:20 PM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
You need to forward traffic to port 80 from your router to your Slackware box, if you want to access your web server from the internet
 
Old 11-11-2010, 05:39 PM   #14
Willian
Member
 
Registered: Oct 2010
Location: Earth
Distribution: Slackware64
Posts: 38

Original Poster
Rep: Reputation: 2
My router is fowarding, on windows I can use apache and all people can access my server but on Slackware I can not make the server accessible.
I use 80 port and the log is free of errors.
 
Old 11-12-2010, 12:26 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
Quote:
My router is fowarding, on windows I can use apache and all people can access my server but on Slackware I can not make the server accessible.
What you mean?
You're dual booting and apache on windows is accessible from outside, while apache on Slackware is not?
If that's the case, check if it's a firewall problem and if apache is listening on all available interfaces:
Code:
iptables -L
netstat -tanpl|grep httpd
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Access Apache Web URLs Remotely eliassal Linux - Server 4 06-08-2010 09:31 AM
Cannot Access Apache Web URLs Remotely Without Port Number nikhil010586 Linux - Server 8 03-07-2009 04:27 AM
Help - Setting up Apache/CGI/Perl remotely - Redhat/Putty shallowfellow Linux - Server 1 12-13-2007 03:36 PM
Can't access Apache remotely zwyrbla Linux - Software 7 03-23-2005 07:14 PM
Editing webpages on Apache remotely patpawlowski Linux - Software 2 02-07-2004 12:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration