Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
03-07-2006, 12:31 AM
|
#1
|
Member
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40
Rep:
|
Configuring Apache and OpenWebMail for Virtual Hosts
Hello!
I am trying to configure an Apache2 webserver using name-based virtual hosts, and I want to offer web-based email along with the virtual hosting. I have looked at OpenWebMail's features, and it's a very nice package. I have it installed and working on the Apache server, but here's the issue:
How can I configure the server so that each virtual host can access the OpenWebmail system from it's own domain name? The standard OpenWebmail configuration requires that you enter [ip address of server]/cgi-bin/openwebmail/openwebmail.pl
That's a real pain for most users, because they can't remember what the IP address or any of that stuff is!
How can I configure Apache so that OpenWebmail can be accessed at port 8383 on each virtual host, just like most web-based email programs: [domain-name]:8383
It seems to be logical, but when I try creating a virtual host like <VirtualHost *:8383> it seems like the server ignores this port (yes I configured iptables to pass traffic on this port and restarted Apache).
Thanks for any advice!
Krasl
|
|
|
03-07-2006, 01:55 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
|
Add the port 8383 to the "Listen" directive of your httpd.conf to see if it helps
|
|
|
03-07-2006, 10:33 AM
|
#3
|
Member
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40
Original Poster
Rep:
|
Still an issue:
OK, I set the Listen directive as follows
Listen 80
Listen 8383
and that seemed to work, at least making the server listen on port 8383. I get the Apache placeholder page when going to [server]:8383
Now, I created the VirtualHost directive as follows:
<VirtualHost *:8383>
DocumentRoot /var/www/html/openwebmail
ScriptAlias /var/www/cgi-bin/openwebmail
</VirtualHost>
If I go to [server]:8383 I see the OpenWebmail HELP system. I know there's a redirect.html file there also, so if I go to [server]:8383/redirect.html it takes me to the OpenWebmail login page, but none of the pictures load because it's trying to access the cgi-bin/openwebmail directory, and the document root is already set to cgi-bin/openwebmail, so it's actually looking in ./openwebmail/openwebmail for everything... ugh.
So if I change the VirtualHost to:
<VirtualHost *:8383>
DocumentRoot /var/www/html
ScriptAlias /var/www/cgi-bin/openwebmail
Redirect permanent / ht tp://[server]/cgi-bin/openwebmail/openwebmail.pl
</VirtualHost>
[Note that I didn't really put a space between ht and tp, but the forum software won't let me put "links" until I've posted at least 5 times.]
This seems to work until I use Virtualmin to create another virutal host. Then it can't find anything at [server]/cgi-bin/openwebmail/openwebmail.pl
??????
Thank you!
Krasl
|
|
|
03-07-2006, 04:41 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
|
Quote:
This seems to work until I use Virtualmin to create another virutal host. Then it can't find anything at [server]/cgi-bin/openwebmail/openwebmail.pl
|
You must have a "ServerName" directive inside each <VirtualHost *:8383>...</VirtualHost> to give your server a name.
Also your ScriptAlias should look like this:
Code:
ScriptAlias /cgi-bin/ /var/www/cgi-bin
Regards
|
|
|
03-16-2006, 07:37 AM
|
#5
|
Member
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
You must have a "ServerName" directive inside each <VirtualHost *:8383>...</VirtualHost> to give your server a name.
Also your ScriptAlias should look like this:
Code:
ScriptAlias /cgi-bin/ /var/www/cgi-bin
Regards
|
But the problem is: I don't want users to have to type :8383 and then /cgi-bin/openwebmail/openwebmail.pl
I want them to be able to simply type :8383 and it goes to the right page for them to log in.
Is this possible?
Thanks!
Krasl
|
|
|
03-16-2006, 08:00 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
|
Did you try it, to see if it works? I.e. when you go to: http://virtualhost:8383 does it brings you to the openwebmail page? Then it's that page that must access the cgi-bin directory defined for that virtualhost. If that does'n work, looking at the logs should give you a hint about how to correct the DocumentRoot and the ScriptAlias directives.
|
|
|
All times are GMT -5. The time now is 03:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|