0

Magento was working fine but then on trying to access http://80.85.85.79/berguard_stationery
I get an error:
This page isn’t working 80.85.85.79 didn’t send any data. ERR_EMPTY_RESPONSE

I have three magento installations on the same server and visiting the urls for all of them brings up the same error.

From the research I have done, I came across this but it wasn't helpful on how to solve the error.

This error is not logged in /var/log/apache2/error.log

Below is my virtualhost file:

<VirtualHost *:80>
    ServerAdmin admin@shop.com
    DocumentRoot /var/www/html
    ServerName shop.com
    ServerAlias shop.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I have edited my virtualhost file to:

<Directory /var/www/html/magento2/magento2-2.3>
    Require all granted
</Directory>
<VirtualHost *:80>
    ServerAdmin admin@shop.com
    DocumentRoot /var/www/html
    ServerName shop.com
    ServerAlias shop.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html/magento2/magento2-2.3>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
</VirtualHost>

I have edited my virtualhost file to:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.

        #ServerName shop.com
        #ServerAlias shop.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/magento2/magento2-2.3/pub

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        <Directory "/var/www/html">
                AllowOverride all
        </Directory>
</VirtualHost>

I still have the error showing up.

How do I go about solving this error? Screenshot of error displayed in browser

6
  • Without having a lot of information my money is on this request not even hitting Magento. I'd probably check your apache setup if it actually ends up in the right directory for example – Sander Mangel Dec 30 '19 at 9:47
  • @SanderMangel I have edited the post to include the virtual host file I am using. Take a look at my DocumentRoot – Esseme Dec 30 '19 at 10:14
  • If it's Magento 2 it should probably point to the pub directory. I'm also missing some other stuff like Options Indexes FollowSymLinks and AllowOverride All – Sander Mangel Dec 30 '19 at 13:48
  • @SanderMangel I have edited my question, please take a look. Magento was actually working fine 3 days ago. DocumentRoot was pointing to html. For configuring magento2 on linode, I was following [linode.com/docs/websites/ecommerce/… – Esseme Dec 30 '19 at 15:06
  • Afaik the DocumentRoot should point to pub where the index.php is. Check devdocs.magento.com/guides/v2.3/install-gde/tutorials/… for more details – Sander Mangel Dec 30 '19 at 15:16
0

As it turns out, for some reason Port 80 on the server was closed. So I reopened Port 80 using;

sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT

Then importantly for the changes to persist even when server is restarted ;

sudo apt-get install iptables-persistent

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.