bmir
By:
bmir

Cannot connect to DigitalOcean Droplet through IP on web browser.

October 14, 2016 2.2k views
Apache DigitalOcean DigitalOcean Articles Ubuntu

I have Apache2 running and I am trying to connect through port 899

I have adjusted the port to listen to pot 899 through httpd.conf

Any computer I try to access it from I get the same message

It worked when I first set it up. now however It doesn't work anymore (not sure reason) I have tried to make changes, but they didn't work

I get the following error message: (I've edited & x'd out the ip myself below)

This site can’t be reached

192.xxx.xxx.xx refused to connect.
Search Google for 192 xxx xxx 899
ERRCONNECTIONREFUSED

2 comments
  • After making your changes did you restart/reload Apache for the new configuration to take effect?

    service apache2 restart
    

    If so, then I would suggest some other things.

    1.) If you have enabled a firewall on your droplet it may be blocking port 899. Try stopping any firewall service to make sure this is not the cause of the issue. If your site begins working, adjust your firewall configuration and restart it.

    2.) It's possible that your ISP or network is blocking or filtering ports that are not commonly used. Some corporate and school firewalls especially may block ports other than a few commonly used ones to prevent filesharing services and other unwanted services. Try connecting from another device or network to see if this is the case.

    3.) If none of this resolves the problem, please share your current apache configuration file from /etc/apache2/sites-enabled/ and hopefully we can find the issue and suggest a fix.

  • Yes, Initally when I made the change I restarted apache

    1) no firewall is enabled on droplet nor have I touched it since I setup (the site was working, don't think it's firewall)

    2) I've tried it at 3 different environments my work, school, home and the last time it was working was in school. I've tried it at work and at home and it doesn't work.

    3) Inside sites-enabled there is a file called --> 000-default and when I open up that file with vim

    this is it:

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
       <Directory "/usr/lib/cgi-bin">
                  AllowOverride None
                  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                   Order allow,deny
                   Allow from all
         </Directory>
    
         ErrorLog ${APACHE_LOG_DIR}/error.log
    
          # Possible values include: debug, info, notice, warn, error, crit,
          # alert, emerg.
          LogLevel warn
    
         CustomLog ${APACHE_LOG_DIR}/access.log combined
    

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>

1 Answer

Yes, Initally when I made the change I restarted apache

1) no firewall is enabled on droplet nor have I touched it since I setup (the site was working, don't think it's firewall)

2) I've tried it at 3 different environments my work, school, home and the last time it was working was in school. I've tried it at work and at home and it doesn't work.

3) I will get back to you with this soon

Have another answer? Share your knowledge.