Hi all, I’ve been a somewhat longtime user of Webmin + Virtualmin, but i’ve always used it with NGINX (LEMP). This time i decided to give Apache a try. Installed Fresh Virtualmin w Apache (LAMP) on Ubuntu 18.04. Checked to make sure that Apache works. Went to Virtualmin and added a virtual server.
Problem: When viewed from a browser the newly created virtual server for some reason returns the default Apache page from /var/www/html and is not reading required directory /home/dev/public_html
What do the virtualhost directives look like? Click into one, go to Edit Directives if you can’t be botherered with an SSH session.
(They’ll probably all be in httpd.conf unless you change it in the Apache settings to store one .conf per server. Webmin > Servers > Apache > Module Config > “File or directory to add virtual servers to”, provide a path to a folder)
Most common thing would be that they’re missing ServerName and ServerAlias variables so they’re hitting the default document root.
That should be fine. Whats the exact problem right now? If you are referring to the “forbidden page” when you access the domain without uploading your own files, then it is normal because its intended to do so.
Last night i created another domain, domain2.com.conf file appears to be correct, but it also is being sent to the default Apache2 page. In each domains public_html i have their own corresponding .html file to see what is being loaded.
I revised the domain1.com.conf and domain2.com.conf from to <VirtualHost *:80> this seems to have solved the issue. Each domain is now loading from the appropriate folder.
Any idea what I’ve mis-configured and why it doesn’t work with default settings but works like that?
Worth mentioning that inside /etc/apache2/sites-enabled i only have 2 .conf files domain1.com.conf and domain2.com.conf. 000-default.conf is not in there and had been disabled.
Anyways, glad it solved the issue but if I recall it correctly, its not meant to be the default way like you are currently doing so.
Can you provide log files from the time the issue was there?
I’ll provide logs a little later, i need to first clean them of IP addresses and names (I’ll do that after work).
Currently it doesn’t work exactly as it should. It defaults to one of the websites when i just type in my IP address. Which shouldn’t happen, but at least the websites themselves work. I’ll keep on playing with this further and provide update.