0

I switched from nginx 1.18.0 to apache 2.4.41 and apache is still using the nginx default error pages. I removed nginx with sudo apt-get remove nginx. I am using ubuntu 20.04.

edit: contents of sites-enabled

<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 www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # 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
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

1 Answers1

0

Removing nginx will remove the binaries, configs and docs, but will not delete the files in your root (web) directory.

To my knowledge, Apache possibly uses the same default path for the root directory. So I would check /var/www/website.com (default path for nginx on Ubuntu I believe).

You will also want to fix the permissons because you most likely changed them when installing nginx. Do an ls -alR on /var/www - Fix them so they match you needs for Apache. You may refere to this thread here.

1nternetz
  • 156
  • 2