Apache2 Ubuntu Default Page shown after reinstalling apache

2 posts / 0 new
Last post
#1 Thu, 11/28/2019 - 04:53
lex

Apache2 Ubuntu Default Page shown after reinstalling apache

Hi,

this morning the apache server was down. I found out some file was missing and the online advise that worked was to purge apache and reinstall it. I did that, and I could restart apache afterwards. However, all the 'servers' / websites now point to the Apache2 Ubuntu Default Page.

Deleting /etc/apache2/sites-enabled/00-default.conf, such as suggested here: https://virtualmin.com/node/37342 broke apache again.

I tried as well disabling and enabling virtual servers, no better result.

Now I'm at the same point again, apache2 up and running but all websites on the server pointing to the Apache2 Ubuntu Default Page.

In /etc/apache2/sites-available all the config files are there. (As is 000-default.conf)

If I go to webmin - servers - apache webserver - existing virtual hosts, then I see only 'default server', and 'virtual server'. The 'document root' of the virtual server is '/var/www/html' (and it seems all the virtual servers point to this)

What can I do? Thanks!

Operating system Ubuntu Linux 14.04.1 Perl version 5.018002 Path to Perl /usr/bin/perl BIND version 9.9 Postfix version 2.11.0 Mail injection command /usr/lib/sendmail -t Apache version 2.4.7 PHP versions 5.5.9, 5.6.40 Webalizer version 2.23-08 Logrotate version 3.8.7 MySQL version 5.5.62 ProFTPD version 1.35 SpamAssassin version 3.4.2 ClamAV version 0.100.3

Thu, 11/28/2019 - 16:09
lex

Ok, here's what I had to do to get it working:

in sites-enabled were no symlinks to sites-available (where all the "virtual servers" were configured) to create the symlinks: a2ensite domain.com

but I quickly ran into this problem: service apache2 reload * Reloading web server apache2 * * The apache2 configtest failed. Not doing anything. Output of config test was: [Thu Nov 28 17:11:41.546493 2019] [so:warn] [pid 6454:tid 140699176986496] AH01574: module rewrite_module is already loaded, skipping AH00526: Syntax error on line 34 of /etc/apache2/sites-enabled/**********.com.conf: Invalid command 'Action', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed.

Virtualmin >> System Settings >> Re-Check Configuration

The Apache module mod_actions is either not installed or not enabled

enabled via:

webmin -> servers -> apache webserver -> global configuration -> apache modules -> actions

Other modules I had to enable: cgi, ssl, perl

[fcgid:emerg] [pid 29519] (2)No such file or directory: mod_fcgid: Can't create shared memory for size 1200712 bytes

had to do this: /var/lib/apache2 # mkdir fcgid root@ns1 /var/lib/apache2 # chown www-data:www-data /var/lib/apache2/fcgid root@ns1 /var/lib/apache2 # /etc/init.d/apache2 start

In "/etc/apache2/mods-enabled/php.conf" (replace php with your filename, depending on the php version you're using) comment out the following two lines:

SetHandler application/x-httpd-php SetHandler application/x-httpd-php-source

sudo service apache2 restart

Clear your browser cache (Ctrl+Shift+Delete)

My sites started to work when I set them to apache mod_php, not fcgid

then I had to a2ensite everyvirtualserverdomainonmyserver.com

and i was back in business :)

Topic locked