1

I've got a problem with my Apache installation on Ubuntu 17.10.

On this machine I have classic (I suppose) LAMPP installation with Apache, PHP and MySQL database for supporting owncloud and webmin.

Everything was working fine since a couple of days ago when I installed utorrent following this guide.

Of course, I choosed for the Apache version (I skipped the ngix part) and everything seamed to be OK.

But it was not...because since then, I was not able to reach my server from my LAN anymore.

If I browse from this local machine, all my sites are working fine. Even with the loopback address or the local address. But from the the other PCs of the LAN, they don't respond anymore.

I suppose that was beacause of the reverse proxy step of the utorrent guide, but I'm not sure about it and I don't know how to check it.

I also checked ufw for the firewall and all the ports needed are correctly opened.

So, my question is: how can I correctly diagnose the problem? How can I check what's going on with apache?

edit: This is the reply to "apache2ctl -S":

VirtualHost configuration:
*:80                   my.public.url (/etc/apache2/sites-enabled/000-default.conf:1)
*:443                  my.public.url (/etc/apache2/sites-enabled/default-ssl.conf:2)
*:7070                 my.public.url (/etc/apache2/sites-enabled/utorrent.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default 
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

and this is the reply to "netstat -lntu":

Connessioni Internet attive (solo server)
Proto CodaRic CodaInv Indirizzo locale        Indirizzo remoto       Stato      
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:5939          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:7070            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:10015         0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:6881            0.0.0.0:*               LISTEN     
tcp6       0      0 :::5355                 :::*                    LISTEN     
tcp6       0      0 :::10000                :::*                    LISTEN     
tcp6       0      0 :::80                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::443                  :::*                    LISTEN     
tcp6       0      0 :::7070                 :::*                    LISTEN     
tcp6       0      0 :::6881                 :::*                    LISTEN     
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 0.0.0.0:5355            0.0.0.0:*                          
udp        0      0 0.0.0.0:10000           0.0.0.0:*                          
udp        0      0 0.0.0.0:1900            0.0.0.0:*                          
udp        0      0 0.0.0.0:40864           0.0.0.0:*                          
udp        0      0 127.0.0.53:53           0.0.0.0:*                          
udp        0      0 0.0.0.0:68              0.0.0.0:*                          
udp        0      0 192.168.2.24:49308      0.0.0.0:*                          
udp        0      0 127.0.0.1:51640         0.0.0.0:*                          
udp        0      0 0.0.0.0:631             0.0.0.0:*                          
udp        0      0 0.0.0.0:6881            0.0.0.0:*                          
udp6       0      0 :::5353                 :::*                               
udp6       0      0 :::5353                 :::*                               
udp6       0      0 :::5355                 :::*                               
udp6       0      0 :::43741                :::*                               
udp6       0      0 :::6881                 :::*
| improve this question | | | | |
0

If you have configured reverse proxy in *:80 port, that is the behavior of apache. Remove the reverse proxy directives you created and your web server is functional again.

I mean the:

<VirtualHost *:80>
    ServerName utorrent.your-domain.com

    RewriteEngine on
    RewriteRule ^/gui(/?)(.*)$ /$2 [PT]

    ProxyPreserveHost on
    ProxyPass / http://127.0.0.1:8080/gui/
    ProxyPassReverse / http://127.0.0.1:8080/gui/
</VirtualHost>
| improve this answer | | | | |
  • I have this in my utorrent.conf: <VirtualHost *:7070> RewriteEngine on RewriteRule ^/gui(/?)(.*)$ /$2 [PT] ProxyPreserveHost on ProxyPass / http://127.0.0.1:7070/gui/ </VirtualHost> Do you think there is something weird in my code? – Saggia Mar 19 '18 at 17:58
  • Do you have any servername on your config? You can debug with "apache2ctl -S" to show how request are handled... – Pasi Suominen Mar 19 '18 at 20:04
  • "netstat -lntu" should show also your ports that are listening tcp / udp... – Pasi Suominen Mar 19 '18 at 20:07
  • I edited my first post with the replies to the commands you suggested. Keep in mind that 192.168.2.24 is the LAN ip address. Many thanks for your help @PasiSuominen – Saggia Mar 20 '18 at 7:41
  • Apache is not listening any ipv4 addresses with port 80, just ipv6 address... Also common practice is not listen *, specify your ipv4 address you want to listen on your vhost conf. To diagnose more specific, you need to post those configurations to pastebin or something else. – Pasi Suominen Mar 20 '18 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.