Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Help: Apache http server not accessible over home network

  1. #1

    Default Help: Apache http server not accessible over home network

    Hi,

    I'm a Linux newbie and I'm experimenting with Suse, Apache.
    Here's my goal to start with - I'm trying to set up Apache on a suse machine and have a website(simple html page) to host over my home network. I want to be able to see the website from a different machine (windows).

    I installed Apache2 on my suse machine

    Details:
    1. on issuing command -
    httpd2 -v
    Server version: Apache/2.2.22 (Linux/SUSE)
    Server built: 2013-07-30 09:42:03.000000000 +0000

    2. On issuing command
    /etc/init.d/apache2 status
    redirecting to systemctl
    apache2.service - apache
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
    Active: active (running) since Thu, 30 Jan 2014 17:31:50 -0500; 4s ago
    Process: 2550 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=0/SUCCESS)
    Main PID: 2569 (/usr/sbin/httpd)
    CGroup: name=systemd:/system/apache2.service
    ├ 2569 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start
    ├ 2570 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start
    ├ 2571 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start
    ├ 2572 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start
    ├ 2573 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start
    └ 2574 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start



    3. http://localhost works on Suse machine
    4. http://192.168.1.149 works from suse machine

    5. I'm able to ping to ip 192.168.1.149 from windows machine, But when I try to access the link on webpage, it does not work.
    I'm trying http://192.168.1.149 and http://192.168.1.149/index.html from the windows machine.

    6. I searched a lot of forums and help to try to resolve this problem-
    I verified the httpd.conf file has the following-

    <Directory />
    Options None
    AllowOverride None
    Order allow,deny
    # Deny from all
    </Directory>

    7. It has an entry as follows for listen.conf
    Include /etc/apache2/listen.conf

    8. The listen.conf has the following entry -
    Listen 192.168.1.149:80

    I can provide any additional diagonostics as required.
    Much appreciate any help.

    Vikram

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,728

    Default Re: Help: Apache http server not accessible over home network

    Hello and welcome here.

    Readig your post, I get the idea that you tried to give us useful informatiuon, but some basic things are still missing. E.g. what is your openSUSE version?

    Then you tell things like "I installed Apache2 on my suse machine", but you do not tell us the technical details. The way I would do (well have done it several times) is going to YaST > Software > Software management. Then I choose from the View menu: Patterns. Then I scroll down to Server functionality and check Web- and LAMP server for installtion. Did you likewise or similar?

    Then there is of course YaST > Network Services > HTTP-Server. Did you try that?

    An alternative is to change the Apache configuration manualy and the ativate/start it with YasT > System > Services Manager. Did you do that?

    It seems that you are starting/stopping apache2 in an old-fashioned way (sysvinit), that faalls back on the systemd way, but it does not show that you are up-to-date in these matters.

    Doing things manualy has the drwaback that it is easy to forget something. Things that a management tool like YaST won't forget. Did you e.g. think about your Firewall?

    And last. please when you post computer text her, do so by copy/paste of the prompt, the command, the ouput and the next prompt between CODE tags in the post. You get tthe CODE tags by clicking on the # button in the tool bar of the post editor.

    And a last remark. While I do know almost nothing about MS Windos. You say you ping from such a system to your web-server. But can you try e.g. a telnet to port 80? In Unix/Linux that would be
    Code:
    telnet 192.168.1.149 80
    Henk van Velden

  3. #3

    Default Re: Help: Apache http server not accessible over home network

    Hello,

    Thank you for the reply.
    Let me give you more information (atleast as much as I can) I'm not at my home network, so cannot telnet into the Linux box, but nevertheless here are some information requested-
    (red text are follow up questions to get instructions to perform certain activity requested)

    1. Open Suse version : 12.2

    2. Apache install method-
    YaST > Software > Software management - searched for apache2 and installed the modules.
    I have also installed the LAMP server.

    3. So I do have the YaST > Network Services > HTTP-Server option available now.
    I used the HTTP server to configure the server and host.
    the ip of my host is 192.164.1.149
    port is 80
    (This is being verified in the listener.conf file I presume)

    4. I use the following command to start / stop /restart apache
    Code:
    /etc/init.d/apache2 start
    /etc/init.d/apache2 stop
    Is there a different /better way to stop/start apache??

    5. I have not used / configured a firewall.
    How do I check if it is automatically setup or if there is an existing firewall in place?

    6. I will post the results of telnet as soon as I get home.

    Vikram

  4. #4

    Default AW: Re: Help: Apache http server not accessible over home network

    Quote Originally Posted by vikramj View Post
    4. I use the following command to start / stop /restart apache
    Code:
    /etc/init.d/apache2 start
    /etc/init.d/apache2 stop
    Is there a different /better way to stop/start apache??
    There are other ways:
    Code:
    rcapache2 start/stop/restart
    systemctl start/stop/restart apache2.service
    or YaST->System->Runlevel Editor.

    None of those is "better" than the others, because they all do the same in the end.

    To start it automatically on boot:
    Code:
    systemctl enable apache2.service
    or
    Code:
    chkconfig apache2 on
    or YaST->System->Runlevel Editor.

    5. I have not used / configured a firewall.
    How do I check if it is automatically setup or if there is an existing firewall in place?
    The firewall is enabled by default, and Port 80 is _not_ open.
    Enter YaST->Security and Users->Firewall and enable the "HTTP Server" on the "Allowed Services". Or click on "Stop Firewall Now" on "Start Up" to test if it works then.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,728

    Default Re: Help: Apache http server not accessible over home network

    Like Wolfi323 says.

    You are still using 12.2. You are aware of the fact that support stops on that version one of these days?

    I am not sure if systemd was already in use on 12.2. When not the new systemctl commands will not work. When systemd is functioning (on this or any newer version you may decide to upgrade to), you better learn the new ways of working. While the old way still functions as a compatibility, sticking to old ways too long is never good.And of course YaST as system management tool works with both and relieves you of the question how to do this.

    What I understood from your story is that using the server from another openSUSE system does work, but not from an MS Windows system. That is strange and most probably not due to your server. Except when you explicitly deny IP address(ranges), I know of now whay to block others on their operating system. Thus I would check tthe MS Windows system (and I askked you if you can do a telnet to posrt 80 on the server).
    Henk van Velden

  6. #6

    Default AW: Re: Help: Apache http server not accessible over home network

    Quote Originally Posted by hcvv View Post
    You are still using 12.2. You are aware of the fact that support stops on that version one of these days?
    Support has actually stopped already a few days ago.

    I am not sure if systemd was already in use on 12.2.
    Yes. Systemd was introduced as default in 12.1 already.
    Of course back then you could still switch back to sysvinit.

    When systemd is functioning (on this or any newer version you may decide to upgrade to), you better learn the new ways of working. While the old way still functions as a compatibility, sticking to old ways too long is never good.
    The /etc/init.d/apache2 script may disappear in the future if/when apache gets a native systemd unit. If/when that happens I have no idea.
    The rcapache2 symlink should still work even then though.

    What I understood from your story is that using the server from another openSUSE system does work, but not from an MS Windows system. That is strange and most probably not due to your server. Except when you explicitly deny IP address(ranges), I know of now whay to block others on their operating system. Thus I would check tthe MS Windows system (and I askked you if you can do a telnet to posrt 80 on the server).
    AFAIUI he was only able to access the server from localhost, either by using localhost or the IP-Address:
    3. http://localhost works on Suse machine
    4. http://192.168.1.149 works from suse machine
    I read that as it works from the same Suse machine, but not from any others in the network.

    Therefore it's most likely a firewall issue for me.

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,728

    Default Re: AW: Re: Help: Apache http server not accessible over home network

    Quote Originally Posted by wolfi323 View Post

    AFAIUI he was only able to access the server from localhost, either by using localhost or the IP-Address:

    I read that as it works from the same Suse machine, but not from any others in the network.

    Therefore it's most likely a firewall issue for me.
    I was not sure of that, that is why I asked explicitly, so he would be forced to tell the truth

    Specialy the difference between using localhost and the IP address is not clear to me. IIRC the TCP/IP stack decides in both cases that it is an internal connection. But I may err here.

    So either it is internal vs. external, or it is MS Windows vs. "normal" systems

    In any case, when it is not working from other systems in the LAN, then it is indeed most likely a firewall problem. Simply swith it off to test. And then fine-tune it.
    Henk van Velden

  8. #8

    Default Re: AW: Re: Help: Apache http server not accessible over home network

    Hello,

    Im sorry for the confusion I caused.
    Both the urls http://localhost and http://192.168.1.149 were tried from the server box (SUse Linux machine)

    I haven't been able to connect to the html page from any machine on the network. (I'm trying to connect to the Suse Linux machine from a windows machine)

    Thank you wolfi323 for your suggestion about the default firewall being on.
    Once I return home,
    - I will try to turn it off and run it and verify my findings with you.
    - I will telnet to the suse machine on port 80 andshare my findings.


    Also thank you for the note about Suse 12.2 being not supported anymore. I will plan to upgrade the version sometime soon.



    Vikram

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,728

    Default Re: Help: Apache http server not accessible over home network

    Then it is most probablythe firewall. And trying with a browser or telnet to port 80 is the same test then.
    Henk van Velden

  10. #10

    Default Re: Help: Apache http server not accessible over home network

    Thank you, Thank you !

    It was a firewall issue and after I took care of the same, the website works fine now.

    Much appreciate the help.
    Can we mark this as solved?

    Vikram

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •