PDA

View Full Version : [ubuntu] Remote connection


Nirva
July 4th, 2008, 11:14 AM
Hay,

I have a little problem.
I have a LAMP server running on my Ubuntu-box.
Untill some days I could connect to both my apache-server and my MySQL-Database from other computers on our LAN. But today I can't do this anymore. The server is running, because I can connect to apache through http://localhost
I don't know why, I haven't changed anything that I know of.
Can someone please help me ?

Thanks

jombeewoof
July 4th, 2008, 12:51 PM
is your server DHCP?
check ifconfig to see if the IP has changed.

If not that, make sure apache is still set to use eth0 (or whatever your interface is) and that the server can access (via ping) the internet.

Nirva
July 4th, 2008, 01:15 PM
The server is DHCP, but the IP-adress is OK.
The server is connected to the internet, but I'm not sure if it is set to listen to eth1 ( as it should be ) where can I check this ?

jombeewoof
July 4th, 2008, 01:24 PM
in /etc/apache2/ports.conf

you will see
Listen 80

<IfModule mod_ssl.c>
Listen 443
</IfModule>

Try changing that to

Listen 192.168.0.1:80

<IfModule mod_ssl.c>
Listen 192.168.0.1:443
</IfModule>

assuming 192.168.0.1 is your IP

got this info from http://httpd.apache.org/docs/2.0/bind.html

Nirva
July 4th, 2008, 01:29 PM
Thanks for helping me, but that didn't work out to well.
I tried changing my ports.conf, but when I did ( as you told ) apache couldn't restart anymore.
This was the error-message :

apache2: Syntax error on line 192 of /etc/apache2/apache2.conf: Syntax error on line 4 of /etc/apache2/ports.conf: Expected </IfModule> but saw </IfModule>/etc/apache2/ports.con>

furlabs
July 5th, 2008, 05:45 AM
Apache is telling you what the problem is. It's expecting </IfModule> but instead the file says </IfModule>/etc/apache2/ports.con>. You probably right-clicked by accident and pasted what was in your clipboard.

Edit /etc/apache2/ports.conf again and go to line 192 (if you are using vim, press ESC :192 ENTER)

Make sure this line says </IfModule> and nothing else, save and quit, then restart apache.