SYSTEM INFORMATION | |
---|---|
OS type and version | Ubuntu 22.04 |
Virtualmin version | 7.8.2 |
This is a continuation of Apache listing php file, not executing it where I described trouble using virtualmin
to transfer Wordpress sites from an old (Ubuntu 18.04 server) to a Ubuntu 22.04 server. I ultimately gave up, and chose a different tack.
Instead, I recreated a virtual server (using Virtualmin) and then used the Virtualmin script to install Wordpress on the VPS. This worked fine. Wordpress worked as expected, and I used it to install the UpdraftPlus plugin. I then used Updraft Plus to back up the server (from the old host) and used Updraft Plus to restore from that backup. I also adjusted /etc/hosts
on my laptop so that the DNS name pointed to the new VPS.
After restoring the site (using UpdraftPlus), here’s the current state:
- When I visit my site
example.com
, my browser displaysFile not found.
- The Virtualmin Apache Error Log file shows
... time stamp ... AH01071: Got error 'Primary script unknown'
- The
/etc/apacha2/sites-availalbe/example.com
file contains the following. (I manually replaced my domain name with “example.com”. Please forgive my copy/paste errors.)ServerName example.com ServerAlias www.example.com ServerAlias webmail.example.com ServerAlias admin. example.com DocumentRoot /home/example/wordpress ErrorLog /var/log/virtualmin/example.com_error_log CustomLog /var/log/virtualmin/example.com_access_log combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/example/wordpress> Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType text/plain .php </Directory> <Directory /home/example/cgi-bin> allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail. example.com RewriteRule ^(.*) http://example.com:20000/ [R] RewriteCond %{HTTP_HOST} =admin. example.com RewriteRule ^(.*) https://example.com:7462/ [R] SSLEngine on SSLCertificateFile /home/example.com/ssl.cert SSLCertificateKeyFile /home/example.com/ssl.key SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 SSLCACertificateFile /home/r example.com g/ssl.ca RemoveHandler .php RemoveHandler .php8.1 <FilesMatch \.php$> SetHandler proxy:unix:/var/php-fpm/155822791930353.sock|fcgi://127.0.0.1 </FilesMatch>
-
The corresponding file at
/var/php-fpm
is shown as:srw-rw---- 1 example example 0 Oct 3 13:00 155822791930353.sock=
What other information could I provide? Many thanks.
Update: I need to emphasize the following;
- Installing Wordpress using the VIrtualmin script worked fine. I could edit & configure it as expected.
- Only after restoring the old Wordpress site from the old-site.com did I run into problems/php stopped working. What settings (especially PHP settings) would have been imported from the old site that leads to tears?
Thanks again.