Apache and Misc problems

I dont have any licenses, so I figure: Virtualmin GPL Downloads

[The Virtualmin GPL installation script is available for Linux and FreeBSD or for Solaris and OpenSolaris 10 and 11.]

No mention of Ubuntu?

The rest of the message under that seems to refer to the manual installation…as a webmin module…

Aha, I understand the confusion now!

Ubuntu is one of several types of Linux distributions. So if you want to run Linux, you might use Ubuntu, or Debian, or CentOS – those are all Linux distributions.

So, you just want to download the Linux version of the install.sh script, that’ll work on Ubuntu Linux 10.04.

-Eric

Hi Eric:

Wow, you were right, that went smoothly ! I am doing the post setup now and its asking me :

[For DNS zones created by Virtualmin to be resolvable, the primary nameserver record for each zone must be set to something that can itself be resolved by other systems on the Internet.]

[Primary nameserver} () Skip check for resolvability

Secondary nameservers (optional)

Its got the server hostname they generated during I guess the Ubuntu install in there as the primary nameserver. its a (3) dot address. Since my old server used actually part of a domain I own and hosted on the server as that actual site, I used it as a hostname also with a 3 dot name…and while it worked, plesk panel thought it was a subdomain. Ought I stay away from doing that here in Webmin? The main reason I did it that way was because a Forum 2 email board in php would get alot of bounced emails back from ISP’s that would do a reverse match and say that the generic machine name does not have the actual domain. Not all ISP mail servers did this, but a great majority…mostly AOL. So it seemed to improve when I actually put the domain name of that site that had the board actually in the hostname like that. For now, I dont want to deal with that domain just yet, but was wondering your thoughts on it?

Howdy,

I would suggest using an FQDN (host.domain.tld) for your hostname. You would want to make sure that your hostname resolves (ie, that there is a DNS entry setup for it), and that should handle a lot of the email sending issues you were seeing.

-Eric

Ok, this is the part that is kinda weird. I have 3 domains I will be moving to this new server being setup. The domain that had the mail problem was the one I picked to use as the fqdn last time…it was server1.domain.tld , so if I use that domain now for this server, I cant really get it to resolve without pointing that systems dns to the new server, and right now, I just want to setup mail and http to work with the 3rd dom,ain that is the smallest site, just to get the feel of the system etc. Can that be done?

Other question I have with the mail setup is, do I need to declare a mailserver in the bind dns server for each domain? The hosting company has their own DNS interface outside of virtualmin that seems to take priority.
If so, where do I setup the mail server for a domain? Is fetchmail needed with dovecot? Can you supply an example for setting up a mail account for one address? I already setup a user in users and groups as the mail address I want to use, Not as user@domain3.tld, simply as the user name. I made its main group [mail] , not sure if thats needed?

Howdy,

You may want to start opening new threads as you have new questions – I’m starting to have trouble following this long forum post :slight_smile:

However, I’ll do my best to answer your questions:

I just want to setup mail and http to work with the 3rd dom,ain that is the smallest site, just to get the feel of the system etc. Can that be done?

Well, you have to setup your server with a hostname in FQDN format (host.domain.tld) that resolves. Otherwise, email is likely to bounce.

Other than that – you can certainly host a domain with just a website and email :slight_smile:

Other question I have with the mail setup is, do I need to declare a mailserver in the bind dns server for each domain?

By default, it’ll use your own server for email delivery. You’d only need to add a custom MX record in your DNS if you wish to use a third party for email delivery.

Is fetchmail needed with dovecot?

Nope!

Can you supply an example for setting up a mail account for one address?

If you want a new email user, first setup your domain in Virtualmin, then go into Edit Users, and create your new email user there.

But you’d definitely want to create your users from within Virtualmin, using Edit Users – I don’t recommend creating users outside of Virtualmin. I wouldn’t recommend going into Webmin to do that either. The way you described above sounds as if you may have created your user in a way Virtualmin wouldn’t know about.

If you want any email aliases along with your newly added email addresses, you can do that by going into Edit Aliases.

-Eric

Hi Eric:

Thanks again for the help. I got the virtual domain created, but I learned when creating it in virtualmin, the apache module over in webmin does not always work accurately with the item created in virtualmin. If I change the home directory in the webmin entry, the virtualmin entry wont pick it up. In fact, you cant point it to a different directory if it already exists as a folder, which is frustrating. So I had the domain already working in var/www/domain1 folder with all its files in domain1 folder…then when I setup the same domain in virtualmin , it let me create it, though it already existed…so I had 2 entries. I deleted the one in webmin, tried working with just the virtualmin interface, and I got my one email account going, but now the files for the site are in the webmin directory. Ok, simple move right? Nope. Cant move all those files with the java file manager, PLUS - I dont have permission to even look in the new folder virtualmin created for the new domain. Its made that folder owned by the new name of the domain I guess when I created it, and it wont let you navigate there unless I guess if you login via FTP as that new user. Kind of frustrating how all these permissions are set like that…

Howdy,

Well, you seem to be going a bit against the grain in regards to how Virtualmin works.

I’d highly recommend not making any changes in Webmin – but instead, to find a way to work with Virtualmin’s workflow.

By default, Virtualmin places websites and user accounts in /home.

That’s because it configures suexec and related tools to run out of /home. Using suexec provides security advantages, since code isn’t running as the Apache user, but instead runs as the account owner.

So if you try to work around Virtualmin, and make Apache run the site out of /var/www – things won’t actually work properly for you.

My recommendation then is to migrate your site to work within /home/USERNAME.

I dont have permission to even look in the new folder virtualmin created for the new domain. Its made that folder owned by the new name of the domain I guess when I created it, and it wont let you navigate there unless I guess if you login via FTP as that new user

That’s correct – a new top-level Virtual Server would setup the files so that they’re only visible to users of that Virtual Server.

To most folks, that’s considered a feature :slight_smile:

I would recommend using a user of that Virtual Server though in order to upload files.

Also, since suexec is being used, it would cause problems if you attempted to use a different user to modify files.

That said, if you really need to do some file management and copy files from their current location to this user’s directory – you could always use a tool like WinSCP to log in over SSH as root, and copy the files that way. But after doing so, be sure to change the ownership of the files to that of the Virtual Server owner.

-Eric

Ok, I thought I understood the new approach as you outlined, but maybe not, or I am just trying to do things that maybe I need to understand better. While I have that domain in the proper location /home/domain/public_html , and the email works, I went to do the same thing for one of my other domains, and it setup in the same format, but if I go to load the first domain, it fails. Its getting information from the domain folder I just entered…and I didnt change anything. This new domain still resolves to my old server, but the one I just got working with the http and email resolves to this server with virtualmin. Is that the problem? One would think that for migration purposes, we can just set up each domain one at a time via http://serverip/the domain , to make sure al the files and stuff and sql work before we actualy do the dns propogation for it all…

You can read about different ways to handle the DNS propagation issues here:

http://www.virtualmin.com/documentation/web/faq

Ok, it was because I created the 1st virtual server with just the domain name less the .tld extension. It let me enter without a .tld and I think that was causing anything else to default back to that virtual server. So I changed it to its corresponding .tld, and same for the new virtual server, and so far the 1st domain is coming up ok. To check the second domain, I guess I have to point it to the correct public_html folder…not sure if there is a way to do that, IE: http://serverip/??domain??

Wil read up on that link you supplied, thanks again !

Eric: Hope you are still there for help. I want to have one open directory under /domain1/open
and I created the directory then gave it R-W permissions in File manager, but if I go there, its not listing directory contents. I think by default maybe apache does this? If I wanted to permit only this directory from being open could use .htaccess, but I also think apache disables all .htaccess by default, and we would need to change that setting someplace?

Well, I’m not entirely certain I understand, but it looks like you may still be going against the grain there… I don’t think that’s going to work the way you want :slight_smile:

If you have a Virtual Server, I’d recommend using the users within that Virtual Server to create, modify, and delete files and directories. And I’d recommend using the files/directories that Virtualmin creates for you to do all that. I wouldn’t recommend trying to use a directory outside of your Virtual Server’s home directory.

Not doing all that may mean you end up with strange permissions and things that don’t work quite right :slight_smile:

-Eric

Hi Eric:

Ok, tried creating the directory as the admin user for the domain in a ftp session. It worked, but the new folder canot be accessed. its pretty much under public_html/folder for the given domain, and it appears htaccess file does not permit it to be an open directory to the world.On my old server I had this problem with plesk, and there is a setting I think in apache where by default, its disabled the htaccess files, and you can re-enable them, but I do not recall more about it at this time.

On another subject , phpmyadmin…I notice it can only be installed for each virtual server. Does this mean each virtual server has to have its own database area? I noticed during the troubles before, I was able to instal phpmyadmin via the system command prompt, and have only one main phpmyadmin login, and each domain was able to access the databases after setting permissions and user names etc. So in regard to phpmyadmin, do you recommend using the seperate logins as per the virtualmin setup?

On another subject , phpmyadmin

Due to the length of this thread, why don’t you open up your new subject in a new forum post… that’ll help keep me from getting confused :slight_smile:

Actually, if you have any additional questions after your directory question, it might be best to start a new thread with them. It’ll help us better keep track of things :slight_smile:

It worked, but the new folder canot be accessed. its pretty much under public_html/folder for the given domain, and it appears htaccess file does not permit it to be an open directory to the world

So you’re saying that you want a user to be able to browse to www.example.com/folder, and be able to see all the folder contents rather than seeing a given webpage?

That is indeed disabled by default, in the Apache “Options” line for each Virtual Server.

All you need to do is enable “Indexes” for that directory. You should be able to use a .htaccess file allow that, and .htaccess files should be enabled by default.

Try putting a .htaccess file in the directory you wish to be open, and add this line to it:

Options Indexes

And then, if that doesn’t work for some reason, take a look in the error log in $HOME/logs/error_log to see if it describes the problem in there.

-Eric