Allow httpd to connect to the network?

I’m using opensuse 11.1. I wanted to know if there was a setting somewhere to allow httpd to connect to the network?

Is it up and running (is it accessible at http://127.0.0.1/ )? No error messages?

Than, you need to open port 80 (and 443 if you intend to use SSL) in the firewall settings.

I think this explains it: Linux Apache MySQL PHP Server (lamp) - openSUSE

Some other tutorials (you might wanna look at swerdna’s for different host settings):
Apache - openSUSE

HowTo: Configure a Linux Apache Web Server on Suse/openSUSE swerdna

Cheers.

I’m using opensuse 11.1. I wanted to know if there was a setting somewhere to allow httpd to connect to the network?

That’s in /etc/apache2/listen.conf. A line saying ‘Listen 80’. But that’s the default. And, in fact, it’s the other way round. It’s not httpd (=apache2) connecting to the network, but it’s someone out there connecting to your httpd. Open port 80 in the firewall and you should be fine. Otherwise tell us exactly what you want to achieve and what you did so far.

I forgot to ask: is apache running at all? You must enable it with yast → System

Let me restate my question.

I understand the concept of listening etc etc…What I wanted to know if there was a setting that would allow HTTPD to connect outward to the network.

Reason being, I have a php mail application. My linux server is able to ping my mail server just fine. But for some reason when it tries to connect to it via FSOCKOPEN, it gets connection timed out.

Someone suggested to me that maybe HTTPD doesn’t have the rights to connect to the network.

When I search other sites…I found “setsebool -P httpd_can_network_connect 1” …which only seems to apply to fedora.

So I wanted to know if there was a similar setting in opensuse.

Let me restate my question.

I understand the concept of listening etc etc…What I wanted to know if there was a setting that would allow HTTPD to connect outward to the network.

Reason being, I have a php mail application. My linux server is able to ping my mail server just fine. But for some reason when it tries to connect to it via FSOCKOPEN, it gets connection timed out.

Someone suggested to me that maybe HTTPD doesn’t have the rights to connect to the network.

When I search other sites…I found “setsebool -P httpd_can_network_connect 1” …which only seems to apply to fedora.

So I wanted to know if there was a similar setting in opensuse.

Let me restate my question.

What I wanted to know is if there was a setting that would allow HTTPD to connect outward to the network.

Reason being, I have a php mail application. My linux server is able to ping my mail server just fine. But for some reason when it tries to connect to it via FSOCKOPEN, it gets connection timed out.

Someone suggested to me that maybe HTTPD doesn’t have the rights to connect to the network.

When I search other sites…I found “setsebool -P httpd_can_network_connect 1” …which only seems to apply to fedora.

So I wanted to know if there was a similar setting in opensuse.

No, selinux is not enabled on openSUSE by default.

Did you try that SMTP connection by hand?

telnet mail-server 25

If you still get connection timed out, it’s likely to be the mail server not allowing you to connect.

abacabb wrote:
> Someone suggested to me that maybe HTTPD doesn’t have the rights to
> connect to the network.

that may be kinda like asking someone to go get a lefthanded hammer or
screwdriver…

that is i think “the network” (or boxes/users connected to it)
connects to Apache/Lighttpd/etc with a request, and the server
responds…not the other way around…

that is, Apache does not (as far as i know) broadcast a signal (like a
radio station) to the network saying “I’m here ready to send you
some pages–just ask! I’m waiting.”

and, if it can’t do that because it “doesn’t have the rights to
connect to the network” and broadcast its “I’m waiting.” message then
no one can fetch pages from your httpd…i don’t think it works that
way…

but i don’t know everything, even if i think i do! :wink:

i do think it is possible to block incoming and/or outgoing http/https
ports and thereby . . .


palladium

No, I think his post was misunderstood. He’s not asking about Apache allowing a connection in or even making a HTTP connection out (although that is sometimes done in some web apps), but about Apache making a SMTP connection out.

As I already wrote, he hasn’t checked if that SMTP server is in fact responding.

Hi Ken_Yap. I did the test as you said and the server did not respond. So the issue appears to be with the mail server after all.

So now I know what question to ask and where…lol…

Thanks!

I fixed it! Thanks Ken. It was network related after all.

The linux server in question is actually a test server I have running on a virtual machine. Some of the VM’s traffic was being blocked by the firewall on my host machine.

I didnt think my host’s firewall could affect my VM…so this issue went on unresolved for almost 4 weeks!

I appreciate the help.

abacabb wrote:
> I fixed it! Thanks Ken. It was network related after all.

i note that i wrote: i do think it is possible to block incoming
and/or outgoing http/https ports and thereby . . .


palladium