Creating a virtual server with Email causes other virtual servers to stop working?

18 posts / 0 new
Last post
#1 Sun, 02/24/2019 - 17:52
shenkwen

Creating a virtual server with Email causes other virtual servers to stop working?

I've been hosting several sites for years on my Linode server. For the first time I wanted to create one with email service, so I just go to "create virtual server" and make sure "accept mail for domain" and other related features are checked. However after it is created, all my websites on the same server were getting "403 forbidden" error, it seems to me those websites are all pointing to a different server, because when I try to open URL like "mywebsite.com/a_file_I_know_exist.php", it will return error saying "file not found" instead of "403 forbidden". After I delete the newly created virtual server, everything went back to normal?

Can anyone enlighten me about what could possibly be the cause?

My server is Ubuntu 16.04/PHP7.2/apache2.4

Wed, 02/27/2019 - 01:20
Phil1ooo
Phil1ooo's picture

Hi

I did the same thing years ago and had the same problems. Now although times change and things improve I don't know about your situation but the main cause of the problem is most of the main core requirements needed to be do within the main servers core which forced me at the time to move everything to a new dedicated server starting with all email core setups first and then placing everything on top of that and never had an issue after that.

So unless things have changed email service core codes won't work in a virtual server (VPS) system but once the core is configured the actual email program will work inside VPS.

Hope this helps you.

Cheers

Just starting out and all is new so I apologize in advance if the terms used are not correct.

Tue, 03/05/2019 - 02:44
bartbl

does anyone have a similar problem? debian 8.11 virtualmin 6.06 I have exactly the same thing. when I add a new server, [without email support] my pages stop working. apache queries are routed to the newly created server - they are visible in /var/log/virtualmin/nweser_acces.log the problem concerns as it appears http queries, these after https are implemented correctly. I do not see any strange entries in the apache2 configuration.

Sun, 03/10/2019 - 21:56
shenkwen

I just found out this happens not just with servers with email, as for not on my machine creating any virtual server will cause other website to stop working and get 403 forbidden error, what could possibly be wrong?

Sun, 03/10/2019 - 23:10 (Reply to #4)
adamjedgar

is it possible that my heartache over the last 14 hours is not my fault?

I migrated a server from Google Cloud Compute to Vultr, used the backup/restore virtual server option from inside virtualmin to make the migration. I was unable to perform one single migration and had to resort to individual virtual servers (1 at a time).

i thought all was going well and i completed the move of a couple of virtual servers until i migrated what was originally, the first virtual server in the list on my old system. As soon as this one was restored onto my new server, the entire server shit itself. I spent the next 2 hours tearing my hair out trying to get Webmin functioning again...eventually succeeding. Then once this was sorted, i was unable to browse any websites except the very first one i migrated on my new server.

I decided to delete and then attempted to create new virtual servers...forwarded the Registrar A records to these virtual servers one at a time...absolutely no one home.

It was as if apache had no idea how to resolve the websites internally from the vhosts file. I checked this file and all of the .com's i had setup were there in said file.

Now i deleted the entire Vultr instance and started over.

I setup a debian sudo user who is part of the sudoer group (should i have used the unix root instead?)

I setup the virtual servers (this time not migrating) and ran the install script for fresh Wordpress on each.

As soon as i attempt to follow the virtualmin instructions saying to navigate to http://mydomain.com/wordpress/wp-admin/install.php i get a database connection error.

I checked my wp-config.php file and it is obvious that the script is not updating the wordpress /wp.config file with the virtual server details at all WTF? The user, password, and database information is blank (ie wordpress.org default ones "database_name_here", "username_here", password_here"). The script is supposed to update these to match my newly created virtual server! It seems that the virtual server user doesnt have the required permissions to edit the wp-config file and or write to the database itself for that matter?

I have checked the permissions on my virtual server...all files are virtual server : virtual server, and permissions set to 750 and 644

I dont know if my problem is similar?

Are these problems all related?

I am about to blow away another 3 hours worth the work and start over again. I will create another new instance from which i can compare in order to try to figure out what is going wrong. i am going to not change a damned thing (leaving absolutelly all defaults in place and see what happens).

I will report back in a few hours...it will either be a positive post here...or a "blood curdling war cry"!

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Mon, 03/11/2019 - 00:45
adamjedgar

FFFFFFFFAAAAAAAAAAAARRRRRRRRRRRRRKKKKKKKKKKKKKKKK!!!!!!!!!!!!!!

Brand new install...did not change a thing.

started with a root user as assigned with original debian install...installed virtulamin. From inside virtualmin, created a new virtual server (without changing anything except adding the ability to edit databases) switched to the virtual server admin and then ran the wordpress install script...

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

This is absolutely stuffed, there is something seriously wrong!

I have Centos Web Panel running on another server...I think i have no alternative but to move everything onto that or spin up an ISPConfig server.

This is bloody hopeless. My existing Google Cloud Compute Virtualmin server has been running almost flawlessly for over a year doing this without problems.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Thu, 04/04/2019 - 15:45
duplex13

Hello,

I have axactly the same problem (Debian 8.11 64 bits, virtualmin 6.06-2, Apache 2.4.10) : When I add a top-level new virtual server, all the other site have the error : "Forbidden You don't have permission to access / on this server" on the home page and all the other page have the error "Not Found"

After having deleted the new virtual server, every site is online again.

Do you have found a solution ?

Thanks

Vincent

Thu, 04/04/2019 - 16:44
bartbl

check how your virtual vhost configuration looks like in apache. for me, the part was in the form of virtual host *: 80, part in the form 123.123.123.123:80 all of them were automatically added by virtualmin. I've modified the configurations manually to 123.123.123.123:80 and everything works fine.

Thu, 04/04/2019 - 17:10
duplex13

Hello,

Thanks a lot for your answer. I'm not sure I understand. I don't see in the form an adress like *.80 or some numbers like xxx.xxx.xxx.xxx:80.

If I see the other virtaul server, they have all the IP adresses as : 37.187.73.92, 2001:41d0:000a:295c::

Perhaps, I have to change something in the form to do the same ?

Vincent

Thu, 04/04/2019 - 18:02
bartbl

check in / etc / apache2 / sites-enabled as the configurations for vhosts look like. you can also see this by previewing in webminie in servers - apache2 virtualhosts or similarly, whether all servers have an ip address assigned in configuration. Look here: https://httpd.apache.org/docs/2.4/vhosts/examples.html I think you will understand what I am writing about. as I wrote. for me, some of the configuration was in the form of virtualhost *: 80 part in the form 123.123.123.123:80 [123.123.123.123 is an example, it is about ip server]

Fri, 04/05/2019 - 10:59
bartbl

vincent, how it looks to you

Fri, 04/05/2019 - 11:13
duplex13

Hello,

Thanks for your answer. I have not the time now to have a llok on the server. I hope to be able to see the configuration of the server later.

Tue, 04/09/2019 - 18:35
duplex13

Hello,

Thank you for your answers. As a freelancer you can imagine (or live it) that I have 10,000 tasks to manage. So I have not had time to take into account your answers.

I will test these solutions in a few days and as soon as I have something new, I will follow it here.

Vincent

Tue, 04/16/2019 - 19:48
duplex13

Thanks a lot bartbl, it works now.

The problem was effectively in the new /etc/apache2/sites-available file created by Virtualmin. Since january 2019, Virtualmin has changed the template and now it creates a file for a now Virtual Server in this directory with the first line as : instead of , so all the other virtual server are redirected to this virtual server. I just change the first line of the new file and relaunch Apache and now all the sites are online.

Thans again

Vincent

Fri, 07/12/2019 - 19:16 (Reply to #14)
dragonslayr

just ran into this. My fix, since it's obvious virtalmin is going to create new servers in this manner, was to change all the other sites to match. Seems to be working just fine. With that said: in /etc/apache2/sites-available You will notice the top line in all the old sites starts with this. VirtualHost *:80 But your new site starts with this: VirtualHost 253.52.65.85:80

I changed all the old sites to read like the new site with the ip address in it. Going forward, I'd suggest this issue may not come up again.

Tue, 08/06/2019 - 05:24 (Reply to #15)
dimmuboy

I have totally same issue, here's some explanation https://serverfault.com/questions/791421/namevirtualhost-does-not-work-o...

Thu, 08/15/2019 - 12:12
Aiman

Operating system CentOS Linux 7.6.1810 Webmin version 1.921 Virtualmin version 6.07 Apache version 2.4.6 the solutions not clear

the problem when I create Virtual Server. I have the same error ( Forbidden

You don't have permission to access / on this server.)

pls help me

Thu, 08/15/2019 - 12:49 (Reply to #17)
Aiman

the solutions for me in this link

https://www.youtube.com/watch?v=CN8DLg0puzk

thank for all