"Create virtual server" New virtual server's domain doesn't resolve like it used to after sudo apt-get update/upgrade ubuntu 16

2 posts / 0 new
Last post
#1 Thu, 11/29/2018 - 01:09
bablicious69

"Create virtual server" New virtual server's domain doesn't resolve like it used to after sudo apt-get update/upgrade ubuntu 16

All installed packages are up to date.

Previously: (Working) Ubuntu Linux 16.04.2 Webmin version 1.852 Usermin version 1.720 Virtualmin version 6.00

Currently: (Not Working) Ubuntu Linux: 16.04.2 on Virtual box Mac. Webmin version: 1.900 Usermin version: 1741 Virtualmin version: 6.04

Perviously, Virtual Server was working fine which means on create Virtual Server, i could access the domain e.g phpmyadmin.localhostdev.com (in my case). However, after update (Pervious and Current version listed above) when i create Virtual Server and access the domain name e.g testing.localhostdev.com it resolves ubuntu default page i-e /var/www. I never had this issue previously.

This is how my phpmyadmin.localhostdev.com.conf looks: (Created in old version: 6.00)

<VirtualHost *:80>
SuexecUserGroup "#1003" "#1003"
ServerName phpmyadmin.localhostdev.com
ServerAlias www.phpmyadmin.localhostdev.com
DocumentRoot /home/phpmyadmin/public_html
ErrorLog /var/log/virtualmin/phpmyadmin.localhostdev.com_error_log
CustomLog /var/log/virtualmin/phpmyadmin.localhostdev.com_access_log combined
ScriptAlias /cgi-bin/ /home/phpmyadmin/cgi-bin/
ScriptAlias /awstats/ /home/phpmyadmin/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/phpmyadmin/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
FCGIWrapper /home/phpmyadmin/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/phpmyadmin/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/phpmyadmin/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RemoveHandler .php
RemoveHandler .php7.0
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
<Files awstats.pl>
AuthName "phpmyadmin.localhost.dev statistics"
AuthType Basic
AuthUserFile /home/phpmyadmin/.awstats-htpasswd
require valid-user
</Files>
php_value memory_limit 32M
IPCCommTimeout 9999
</VirtualHost>

This is how my testing.localhostdev.com looks after the update: (Created in new version: 6.04)

<VirtualHost 10.0.2.15:80>
SuexecUserGroup "#1032" "#1032"
ServerName testing.localhostdev.com
ServerAlias www.testing.localhostdev.com
ServerAlias webmail.testing.localhostdev.com
ServerAlias admin.testing.localhostdev.com
DocumentRoot /home/testing/public_html
ErrorLog /var/log/virtualmin/testing.localhostdev.com_error_log
CustomLog /var/log/virtualmin/testing.localhostdev.com_access_log combined
ScriptAlias /cgi-bin/ /home/testing/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/testing/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
AddHandler fcgid-script .php7.2
FCGIWrapper /home/testing/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/testing/fcgi-bin/php7.0.fcgi .php7.0
FCGIWrapper /home/testing/fcgi-bin/php7.1.fcgi .php7.1
FCGIWrapper /home/testing/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/testing/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.testing.localhostdev.com
RewriteRule ^(.*) https://testing.localhostdev.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.testing.localhostdev.com
RewriteRule ^(.*) https://testing.localhostdev.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.0
RemoveHandler .php7.1
RemoveHandler .php7.2
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
IPCCommTimeout 901
</VirtualHost>

When i chance testing.localhostdev.com.conf to below it works but this is way less than the actual lines. so i want to know how i can fix this so every time i create a server it works like it used to?

<VirtualHost *:80>
    DocumentRoot /home/testing/public_html
    ServerName testing.localhostdev.com

    # Other directives here

   <Directory /home/testing/public_html>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>

</VirtualHost>
Thu, 11/29/2018 - 04:04
bablicious69

So removing below lines from the conf file worked.. But why did VM added these lines in the first place?

AddHandler fcgid-script .php7.1
AddHandler fcgid-script .php7.2
FCGIWrapper /home/testing/fcgi-bin/php7.1.fcgi .php7.1
FCGIWrapper /home/testing/fcgi-bin/php7.2.fcgi .php7.2\
RemoveHandler .php7.1
RemoveHandler .php7.2

Any idea how can i remove these from the default conf file? so when i create Virtual Server these lines are not there.

Also, how can i install PHP v5.6? I can not see it any more

There are 3 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php7.2   72        auto mode
* 1            /usr/bin/php7.0   70        manual mode
  2            /usr/bin/php7.1   71        manual mode
  3            /usr/bin/php7.2   72        manual mode