Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a centos server set up which originally had Plesk on it, but now uses webmin. The problem is that all the nameserver stuff that was on there previously was done through Plesk in its own way. So to create a new site I duplicated everything I could find for a site that was already working. The virtual host is set up and the nameserver script reports no errors. I've pointed the registered name towards my nameserver, but when I visit the site with the browser, it goes to the 'default' directory for the server rather than to the specific site named.
I don't understand what exactly I've done wrong. I've also set up FTP to the site under its name and that works perfectly, but somewhere there is something missing in the config.
Any ideas? Bear in mind that Plesk uses its own system, with most of the config stuff being kept in
/var/named/run-root/var
Is anyone out there familiar with this that can help?
don't suppose anyone can even give me a pointer as to what files I should be looking at? If I have a site which is working with this config, surely there is some kind of paper trail I can follow to find how it all works?
The virtual host is set up and the nameserver script reports no errors. I've pointed the registered name towards my nameserver, but when I visit the site with the browser, it goes to the 'default' directory for the server rather than to the specific site named.
That means that your name server works, as it resolves correctly the hostname to the IP of your webserver.
You need to configure that virtual host in your web server. Since you didn't mentioned what webserver you're running, I assume it's apache, so have a look at this howto for detail about configuring apache and vhosts.
thanks for your help - I understand that, and I will read the useful link you have sent me. However, the problem is that the system had Plesk on it before, and Plesk uses its own system for routing the name servers. So when I set one up in webmin, it doesn't seem to work properly. I've tried to manually replicate what Plesk does through looking at existing sites, but I can't seem to get it to work.
thanks for your help - I understand that, and I will read the useful link you have sent me. However, the problem is that the system had Plesk on it before, and Plesk uses its own system for routing the name servers. So when I set one up in webmin, it doesn't seem to work properly. I've tried to manually replicate what Plesk does through looking at existing sites, but I can't seem to get it to work.
Why you say it's not working properly, as it resolves correctly your domain to its IP address. You can check online your dns here
well, what I mean when I say it's not working properly is this - it find the address of the server, but does not get re-directed to the correct folder for the specific site - it's a multisite setup.
To be clearer - The server hosts three or four sites which were set up in Plesk as virtual hosts. So it has Plesk-generated configuration files which figure out where to point each site in terms of folders in the var/www/vhosts directory. The problem is, when I try to now set up a new host manually, and tell it where to find its content, it just goes to the default folder.
So I guess the real issue is with setting up the virtual hosts part of the name redirection. I apologise if I wasn't clear enough - when I say it doesn't work, I mean it doesn't get directed to its correct folder, it just goes to the default folder.
As I've already told you in my 1st post that it's not a dns issue, rather a webserver vhost configuration.
If you didn't follow the link I've posted there, then try virtualmin to administer your vhosts. IIRC it can also use plesk backups, so it's easier to migrate from plesk to webmin/virtualmin
Thanks, and yes, I understand that now, as I said in my last post, the problem is with the vhosts. It is not taking the name and directing it to the right virtual host. I've read the link you sent and set up the host as specified, and it doesn't work - the only reason I can think of for this is because it is configured to use some kind of basic Plesk configuration / database to match the folders with the host names, instead of the one webmin uses. I had a similar issue with email redirection - Plesk has its own way of doing things.
I don't know how to configure this so I can keep my old Plesk sites and have this new one also work properly. I'll have a look at Virtualmin, though I'm not especially keen to install another admin program.
Note that virtualmin is a webmin module that facilitates the configuration of virtual hosts for web, mail servers and things like that.
Check if you can import your plesk configuration into virtualmin so you can facilitate your job
well, I removed the virtual host and re-installed it. I reset the permissions on the folders to the new user created, but now when I try to go to the site I just get 403 Forbidden.
Sorry to be such a noob, I have no idea why this has happened.
I also tried removing the DNS and having VirtualMin do it. And I got this:
BIND DNS domain failed! : Failed to open /var/named/run-root/var/named/mysite.hosts for writing : Bad file descriptor at /usr/libexec/webmin/web-lib-funcs.pl line 1360
well, I removed the virtual host and re-installed it. I reset the permissions on the folders to the new user created, but now when I try to go to the site I just get 403 Forbidden.
Since you're running centos it could be a SELinux permissions problem. You can always check the apache error_log to see why you get the 403 error
Quote:
BIND DNS domain failed! : Failed to open /var/named/run-root/var/named/mysite.hosts for writing : Bad file descriptor at /usr/libexec/webmin/web-lib-funcs.pl line 1360
Again I suspect SELinux. You can disable it temporarily and see if virtualmin can write to that directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.