Score:0

Can't access Apache webserver from other PC

cn flag

I'm trying to make a website with a domain name. I'm using Apache web-server on Ubuntu 20.04. I can access it internally from my network as https://advice.hopto.org , but unable to access it from other PC in the same network. Following lines are in the configuration of website:

 <VirtualHost *:443>
   ServerName  advice.hopto.org
   ServerAlias www.advice.hopto.org
   DocumentRoot /var/www/advice.hopto.org
   SSLEngine on
   SSLCertificateFile     /home/dell/advicehopto.crt
   SSLCertificateKeyFile  /home/dell/advicehopto.key
</VirtualHost>
<VirtualHost *:80>
    DirectoryIndex index.php index.html
    ServerAdmin [email protected]
    ServerName  advice.hopto.org
    ServerAlias www.advice.hopto.org
    DocumentRoot /var/www/advice.hopto.org
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *>
    DocumentRoot /var/www/advice.hopto.org
    ServerName advice.hopto.org
    <Directory /var/www>
        allow from all
        Options None
    </Directory>
    ServerName advice.hopto.org
   <Directory /var/www/advice.hopto.org>
     AllowOverride All
     Order allow,deny
     allow from all
     Require all granted
  </Directory>
</VirtualHost>

My router is of tp-link. I've forwarded ports 80 and 443 along with the domain name as provided by NoIP(DNS provider).Here is the output of firewall status:

To                         Action      From
--                         ------      ----
9042                       ALLOW       Anywhere                  
3000                       ALLOW       Anywhere                  
9092                       ALLOW       Anywhere                  
9999                       ALLOW       Anywhere                  
1883                       ALLOW       Anywhere                  
8883/tcp                   ALLOW       Anywhere                  
192.168.43.128 8883/tcp    ALLOW       Anywhere                  
8883                       ALLOW       Anywhere                  
8880                       ALLOW       Anywhere                  
8884                       ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
8080                       ALLOW       Anywhere                  
443                        ALLOW       192.168.0.2               
8883                       ALLOW       192.168.0.2               
443                        ALLOW       Anywhere                  
443/tcp                    ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
8083/tcp                   ALLOW       Anywhere                  
443                        ALLOW       13.234.210.38             
443/tcp                    ALLOW       13.234.210.38             
80                         ALLOW       Anywhere                  
Apache Full                ALLOW       Anywhere                  
192.168.0.2 443/tcp        ALLOW       Anywhere                  
192.168.0.2 443            ALLOW       Anywhere                  
192.168.0.2                ALLOW       Anywhere                  
192.168.0.2 80             ALLOW       Anywhere                  
192.168.0.2 8883           ALLOW       Anywhere                  
44                         ALLOW       Anywhere                  
Bind9                      ALLOW       Anywhere                  
Apache                     ALLOW       Anywhere                  
40                         ALLOW       Anywhere  
80                         ALLOW       192.168.0.0/24            
80                         ALLOW       192.168.0.0               
3000:9000/tcp              ALLOW       Anywhere                  
9042 (v6)                  ALLOW       Anywhere (v6)             
3000 (v6)                  ALLOW       Anywhere (v6)             
9092 (v6)                  ALLOW       Anywhere (v6)             
9999 (v6)                  ALLOW       Anywhere (v6)             
1883 (v6)                  ALLOW       Anywhere (v6)             
8883 (v6)                  ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6)             
8080 (v6)                  ALLOW       Anywhere (v6)             
8883/tcp (v6)              ALLOW       Anywhere (v6)             
443/tcp (v6)               ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             
443 (v6)                   ALLOW       Anywhere (v6)             
Apache Full (v6)           ALLOW       Anywhere (v6)             
Bind9 (v6)                 ALLOW       Anywhere (v6)             
Apache (v6)                ALLOW       Anywhere (v6)             
80 (v6)                    ALLOW       Anywhere (v6)             
40 (v6)                    ALLOW       Anywhere (v6)             
3000:9000/tcp (v6)         ALLOW       Anywhere (v6)  

Please help me out in making domain name available inside my network.

in flag
Is the site correctly accessible from outside the network? I ask because I cannot connect. What IP address are you using with NoIP? Does it start with `127.0` or `192.168`? Can you [edit] your question to include the terminal output of `sudo ufw status`?
habib avatar
cn flag
No, I'm using private internet and can't use google website through that internet. I've used 192.168.0.xxx which is the server ip address as ifconfig.
Organic Marble avatar
us flag
does this question have only to do with access from inside the network? If so, why have you forwarded router ports?
vidarlo avatar
om flag
This probably has to with hairpin NAT on your NAT device.
habib avatar
cn flag
I was able to access from remote linux machine only when host file knows domain name of server. How can I make router to open up google so that I can get public ip address for domain configuration? Any idea?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.