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:
on issuing command -
httpd2 -v
Server version: Apache/2.2.22 (Linux/SUSE)
Server built: 2013-07-30 09:42:03.000000000 +0000
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.
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>
It has an entry as follows for listen.conf
Include /etc/apache2/listen.conf
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.
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
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)
Open Suse version : 12.2
Apache install method-
YaST > Software > Software management - searched for apache2 and installed the modules.
I have also installed the LAMP server.
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)
I use the following command to start / stop /restart apache
None of those is “better” than the others, because they all do the same in the end.
To start it automatically on boot:
systemctl enable apache2.service
or
chkconfig apache2 on
or YaST->System->Runlevel Editor.
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.
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).
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:
I was not sure of that, that is why I asked explicitly, so he would be forced to tell the truth lol!
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.
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.