SYSTEM INFORMATION | |
---|---|
OS type and version | Ubuntu 20.04 |
Virtualmin version | 6.17-3 |
I moved one virtualmin server to another VPS and it went haywire somehow. i used the Backup and Restore feature. Both VPS are running the same Ubuntu and Virtualmin versions. When I enter the domain, it says “File not found”.
In apache error logs, I have
AH01071: Got error ‘Primary script unknown’
Here’s my apache host for SSL version
SuexecUserGroup "#1039" "#1007"
ServerName domain.com
ServerAlias www.domain.com
ServerAlias webmail.domain.com
ServerAlias admin.domain.com
DocumentRoot /home/domain/public_html
ErrorLog /var/log/virtualmin/domain.com_error_log
CustomLog /var/log/virtualmin/domain.com_access_log combined
ScriptAlias /cgi-bin/ /home/domain/cgi-bin/
DirectoryIndex index.php index.php4 index.php5 index.htm index.html
<Directory /home/domain/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/domain/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.domain.com
RewriteRule ^(?!/.well-known)(.*) https://domain.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.domain.com
RewriteRule ^(?!/.well-known)(.*) https://domain.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.3
RemoveHandler .php7.4
RemoveHandler .php8.1
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:8012
</FilesMatch>
SSLEngine on
SSLCertificateFile /home/domain/ssl.combined
SSLCertificateKeyFile /home/domain/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
Header set Content-Security-Policy "frame-ancestors 'none';"
Protocols h2 h2c http/1.1
PHP FPM config file
[157492832919133]
user = domain
group = domain
listen = localhost:8041
pm = ondemand
pm.max_children = 15
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/domain/tmp
php_admin_value[session.save_path] = /home/domain/tmp
pm.process_idle_timeout = 10s
pm.max_requests = 50
I have read a lot on it but can’t seem to figure out a solution.
- A few people mentioned rebooting the system fixed it but it didn’t for me.
- I’ve checked file permissions as well and they’re ok.
- Changed PHP version, didn’t make a difference
How do I diagnose the problem?