Home > other >  Access to my ubuntu server with a public ip address
Access to my ubuntu server with a public ip address

Time:11-18

I have a problem with my raspberry pi 4 model B 4Go I have installed Ubuntu Server 21.10 And installed apache2 And I have a basic ssh access I can access it (ssh and web) with its local ip (192.168.1.90) However impossible to connect or to load a web page with its public ip address, firewall of my pc all closed. I don't understand the problem because before on my computer with Wamp installed, lowering the firewall and loading an apache page with a public ip was totally possible (by retesting just now it works without any problem) I also opened port 80 on my box for testing and still nothing

Is there anything else to configure on my box or directly on my server? Thanks

<Directory />
      Options FollowSymLinks
      AllowOverride None
      Require all denied
</Directory>

<Directory /usr/share>
      AllowOverride None
      Require all granted
</Directory>

<Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride None
      Require all granted
</Directory>

#<Directory /srv/>
#     Options Indexes FollowSymLinks
#     AllowOverride None
#     Require all granted
#</Directory>

Here the part of the content in etc/apache/apache2.conf but I don't think it's that since I can't connect anywhere with this ip

CodePudding user response:

The apache configuration is correct. Can you check and upload the /var/log/apache2/error.log file of apache to check what is the error? Run the tail -f command on the log and refresh the web by accessing the public IP.

It is possible that your router is blocking the traffic. Have you opened the ports?

CodePudding user response:

I managed to complete my problem thanks to the "port forwarding" option on my box and not the firewall, it is enough to redirect the ports 80 to its local ip, I did not know at all that this option existed. It is possible to do it with all ports. The firewall doesn't seem to influence this, thanks to you

  • Related