0

I really don't understand how this problem started. Several hours ago there was some PHP error on the website and I have been doing some research about it. Just now when I opened the website it showed the default apache page. I didn't do anything to the server, I don't understand why all of a sudden it shows the default page instead of the error page as it had shown before. Meanwhile, if I open the IP address in browser, the website still shows. I am sure the PHP error has nothing to do with server configuration. So my first question is,

What could be the reason the website suddenly shows the default page?

A little background: there was a Joomla website running on this Ubuntu14.04 machine, worldpeaceever.tv. I mistakenly installed virtualmin on it(which is supposed to be installed on a server from scratch) and the website stopped working, now it just shows the PHP code. In order to recover this website, I use virtualmin to create a virtual server and point a temporary domain wp.nycweb.io to the IP(97.107.137.168) and successfully move the file system and database to this virtual server. When I opened wp.nycweb.io there was some PHP error due to some issue about an installed Joomla template, so I spent the past few hours trying to resolve it. But just now I find out wp.nycweb.io is showing the default page. However, I was able to use the IP(97.107.137.168) to get into the website and fixed the issue.

My 2nd question is, at this point, how do I make the domain correctly shows my website instead of the default page?

I have checked the site conf file which is /etc/apache2/sites-avaialable/wp.nycweb.io.conf and compared it to my other websites that are also running under virtualmin, but I don't find much difference. At this point, I don't know what to do. Could the problem be related to the now dead website(worldpeaceever.tv)? I doubt so. The conf file is as follow:

<VirtualHost 97.107.137.168:80>
SuexecUserGroup "#1001" "#1000"
ServerName wp.nycweb.io
ServerAlias www.wp.nycweb.io
ServerAlias webmail.wp.nycweb.io
ServerAlias admin.wp.nycweb.io
DocumentRoot /home/wp/public_html
ErrorLog /var/log/virtualmin/wp.nycweb.io_error_log
CustomLog /var/log/virtualmin/wp.nycweb.io_access_log combined
ScriptAlias /cgi-bin/ /home/wp/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/wp/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.0
AddHandler fcgid-script .php7.1
FCGIWrapper /home/wp/fcgi-bin/php7.1.fcgi .php
FCGIWrapper /home/wp/fcgi-bin/php7.0.fcgi .php7.0
FCGIWrapper /home/wp/fcgi-bin/php7.1.fcgi .php7.1
</Directory>
<Directory /home/wp/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.wp.nycweb.io
RewriteRule ^(.*) https://wp.nycweb.io:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.wp.nycweb.io
RewriteRule ^(.*) https://wp.nycweb.io:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
RemoveHandler .php7.1
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
</VirtualHost>
1
  • What a mess. The error messages were ..... The logs show .....
    – Panther
    Commented Nov 18, 2017 at 4:16

1 Answer 1

1

Change the open tag of your Virtual Host definition from: <VirtualHost 97.107.137.168:80> to <VirtualHost *:80>. (Similar issue.)

If you want to access your site through http://localhost add the following directive:

ServerAlias localhost

Then restart Apache2.


I think the next shouldn't be required, but if there is till any problem with access the site through http://localhost (or through the IP address) add the following line to /etc/hosts:

97.107.137.168 localhost

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .