Virtual Server gives 403 forbidden error on everything apache

I recently decided to try out webmin. It installed fine, also installed virtualmin fine. When I visited virtual min, I got that little list of the file names, descriptions, etc.

I wanted to set up another virtual server for a test site. once I set that up, I also checked the option that read "apache website enable" - but as soon as I did that, everything dealing with apache gave me a 403 forbidden error. Even if I was just viewing the hostname which would give me the list of the files int he /var/www/html folder I believe.

Once I unchecked the "apache website enable" option, everything came back to normal. It seems as if I can't create another virtual server without apache messing up. I wanted to know if I can get some help with that. It's a fresh install as well on a VPS. I even reinstalled the entire VPS, OS, and control panel three times and it was the same effect every time. I tried searching for a fix in the virtualmin forum but I Haven't been able to find anything dealing with this.

Help would be appreciated.

Regards

Status: 
Active

Comments

Do you have an index.html or index.php file in the public_html directory of your new virtual server?

If not, you will get a 403 error as Virtualmin by default sets up Apache to not show the contents of the directory..

Thanks for the response. And I Tried it with and without an index file.

When I have an index file in there, nothing loads, they all just time out with "not found" - I even restarted apache to make sure it was working properly and nothing. As soon as I unchecked the option to enable apache website, everything loads again for the main hostname.

I'd like to see this for myself if possible .. what is the URL of the site for which Apache isn't working?

http://test2.junahost.info - it works there, it's the main site, I've uploaded that index file in site /var/www/html and it worked perfectly the first time around.

I've set up another virtual server at url http://status.junahost.info/ - when I edit the virtual host and enable apache website, neither one works anymore.

Note: the dns for junahost.info is managed elsewhere, I just set up a-records and point them to the current server's IPs. Since I Only have one IP here to spare I can't set up my own nameservers here to test.

It also doesn't work with the IP so I don't think it's an issue with the DNS itself.

When I view those, they both display a message "Owned by Junoweb". Is that what it's supposed to be doing?

Would it be possible to see a copy of the config file when it's not working?

That is, if you could enable the "Apache Website" feature (which I think you're saying causes a 403 error), then attach the resulting Apache config file (located in /etc/httpd/conf/httpd.conf), that would help us determine what's going on.

Thanks!

Yeah both are just pointing to the IP and since status. has apache disabled, it it's just showing whatever is on the IP instead.

I enabled apache now and now they are both pointing to /home/stat/public_html which is the directory for the newly created virtual server. The last time I did this, they were just timing out, I'm not sure what happened this time that made them point to the public_html directory. My intention was to keep test2.junahost.info as the hostname, and status.junahost.info as the virtual server where I hosted some pages. My main IP is pointing to this folder as well instead of the old /var/www/html location.

And from the httpd.conf file, if you wanted just the virtual host, this is what it says at the bottom:

SuexecUserGroup "#501" "#502" ServerName status.junahost.info ServerAlias www.status.junahost.info ServerAlias webmail.status.junahost.info ServerAlias admin.status.junahost.info DocumentRoot /home/stat/public_html ErrorLog /var/log/virtualmin/status.junahost.info_error_log CustomLog /var/log/virtualmin/status.junahost.info_access_log combined ScriptAlias /cgi-bin/ /home/stat/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +FollowSymLinks allow from all AllowOverride All allow from all RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.status.junahost.info RewriteRule ^(.) https://status.junahost.info:20000/ [R] RewriteCond %{HTTP_HOST} =admin.status.junahost.info RewriteRule ^(.) https://status.junahost.info:10000/ [R]

I would advise against putting anything in /var/www/html , as that the directory for the default website which is outside of Virtualmin's control and hard to predict when it will be served.

Instead, create a new virtual server for each domain you want to serve, and put the HTML content in its public_html directory.

I'm using Virtualmin on my centos 7 server. Create a virtual account by Virtualmin, with a domain name, Unload a program "phplist" / home/my domain.com/public.html/lists FileZilla uploaded all the folders under the programs /lists

After the successful uploaded all the files

When I try login my xxxxxxx.com Got error messages, no permissions in this server

Look at the Apache log, no marching index.html, index.php

If I only upload all the files and folder under public.html I can open.

Should I upland the mail programs under public_html

Under the phplist installation., we should create a directory called lists Then copy all the files under list.

Please help me to proper install this programs

Thanks

Ilia's picture
Submitted by Ilia on Sun, 02/02/2020 - 03:53

Please help me to proper install this programs

Hi,

PHPList might also need you to import databased as well. However, unfortunately it's not something we provide help on, as it's not Virtualmin related.

PHPList script is available for automatic installation in Virtualmin Pro version, from Install Scripts page (with around a hundred of other useful scripts).

You're of course more than welcome to ask about that in our Forums! There's many wonderful folks there, and some may have tried a similar setup. We also monitor the forums, and will chime in where we can.