LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-07-2011, 11:33 AM   #1
highrise
Member
 
Registered: Jun 2011
Posts: 48

Rep: Reputation: Disabled
help with setting up nameserver with Webmin


hi guys

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?

thanks
 
Old 10-08-2011, 11:33 AM   #2
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
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?
 
Old 10-08-2011, 05:59 PM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
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.

Regards
 
Old 10-08-2011, 07:27 PM   #4
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-11-2011, 12:42 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by highrise View Post
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

Regards
 
Old 10-11-2011, 02:30 AM   #6
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-11-2011, 03:37 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

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

Regards
 
Old 10-11-2011, 05:10 AM   #8
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-11-2011, 06:00 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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
 
Old 10-11-2011, 06:34 AM   #10
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
yes, I'm looking into that now - thanks again.
 
Old 10-11-2011, 07:40 AM   #11
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
well, I installed virtualmin and tried to import the virtual host. This is what I got:

Error - Perl execution failed

Undefined subroutine &bind8::list_slave_servers called at /usr/libexec/webmin/virtual-server/import.cgi line 283.

so am back at square one again. I guess I could try removing the virtual host and setting it up again.
 
Old 10-11-2011, 08:39 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Maybe this could be of help
 
Old 10-11-2011, 11:21 AM   #13
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-11-2011, 11:36 AM   #14
highrise
Member
 
Registered: Jun 2011
Posts: 48

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-11-2011, 02:53 PM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting or getting nameserver nuttynibbles Linux - General 5 10-03-2011 04:38 PM
setting up a custom nameserver WebGraphics Slackware 3 10-02-2007 11:45 PM
setting up nameservers in webmin gaz0r Linux - Software 1 09-04-2003 05:20 PM
setup nameserver on a webmin box ? funnyusa Linux - Networking 2 08-17-2003 04:46 PM
setting up Samba w/ webmin kidwired Linux - Networking 3 01-01-2003 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration