Hello,
I've set Virtualmin to create all the vhosts on ports 1080 for HTTP and 1443 for HTTPs. On ports 80 and 443 I've got Nginx running in proxy mode.
The problem is when editing a virtual server and disabling then enabling a Website and SSL Website features the newly created vhost is on IP:80 instead of IP:1080... Also, in /etc/httpd/conf.d/ssl.conf the lines "Listen IP:80" and "Listen IP:443" show up automatically.
After this Apache fails to restart because those ports are in use by the Nginx proxy.
In Virtualmin -> Server templates -> Apache I have:
Port number for virtual hosts: 1080
Port number for SSL virtual hosts: 1443
External port number for virtual hosts: 80
External port number for SSL virtual hosts: 443
When I try to go to virtualserver -> "Website options" I get:
Website options cannot be edited, as no Apache virtual host for dev.anniesloan.co.uk port 80 was found!
(that's because I edited httpd.conf manually to replace with 1080 and 1443)
If I go to "Server configuration" -> "Change IP address" I see:
Current web ports 80 (HTTP) 443 (HTTPS)
Please advise.
Comments
Howdy,
Did you restart webmin after you edited the server template? If you did, you have probably updated the ports in the server template AFTER the domains were created, in this case you would need to edit files inside /etc/webmin/virtual-server/domains and update the ports for your domains. You can do that by running the following commands:
sed -i /etc/webmin/virtual-server/domains/* -e "s,^web_port=80,web_port=1080,g"
sed -i /etc/webmin/virtual-server/domains/* -e "s,^web_sslport=443,web_sslport=1443,g"
Then run
service webmin restart
and recreate the virtualhosts:virtualmin disable-feature --web --ssl --logrotate --all-domains
virtualmin enable-feature --web --ssl --logrotate --all-domains
Submitted by Lucian on Mon, 03/06/2017 - 11:10 Comment #2
Thanks Mostafa, it's possible it was that. I've modified all those domains files.
Submitted by Lucian on Mon, 03/06/2017 - 11:12 Comment #3