简体   繁体   中英

Apache/xampp not working on ubuntu port 80

Xampp/apache have been working fine until today. Basically, if I configure xampp to start apache on any other port, it seems to work fine, but not on port 80. If I navigate to localhost (or 127.0.0.1) it says site can't be reached/connection refused.

I verified netstat while xampp has started apache:

sudo netstat -tulpn | grep ':80\\|:443'

tcp6       0      0 :::80                   :::*                    LISTEN      7351/httpd      
tcp6       0      0 :::443                  :::*                    LISTEN      7351/httpd   

If I shut down apache with xampp the netstat shows 0 results. I also tried running apache with sudo /etc/init.d/apache2 start . That doesn't work either and in that case netstat shows

tcp6       0      0 :::80                   :::*                    LISTEN      8271/apache2 

I have no idea what has happened, it has been working fine until today. I also tried uninstalling and reinstalling xampp again (with the provided uninstaller). Only thing I remember having changed to my system since last time is installing ruby and prax. (I also ran prax stop already). Any ideas what could be causing this?

尝试更改端口 80 和 SSL 端口 443 或者如果您想尝试xampp是一个带有图形界面的服务器 php 就像 windows 上的 wamp

Perhaps your problem is some NAT rules. You have to disable them as stated here:

https://serverfault.com/questions/670575/failed-to-connect-to-127-0-0-1-port-80

I hope it helps.

Not Found The requested URL was not found on this server.

Apache/2.4.41 (Ubuntu) Server at localhost Port 80 in Ubuntu========

That's a type of problem that has been solved via the below code.

Just open your terminal

►Commands

sudo nano /etc/apache2/apache2.conf

after that just add this line at the end and save.

Include /etc/phpmyadmin/apache.conf

then return and restart

►Commands

sudo /etc/init.d/apache2 restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM