LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 03-07-2006, 12:31 AM   #1
krasl
Member
 
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40

Rep: Reputation: 15
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
 
Old 03-07-2006, 01:55 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
Add the port 8383 to the "Listen" directive of your httpd.conf to see if it helps
 
Old 03-07-2006, 10:33 AM   #3
krasl
Member
 
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40

Original Poster
Rep: Reputation: 15
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
 
Old 03-07-2006, 04:41 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
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
 
Old 03-16-2006, 07:37 AM   #5
krasl
Member
 
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40

Original Poster
Rep: Reputation: 15
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
 
Old 03-16-2006, 08:00 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache Virtual Hosts quozt Linux - General 3 10-15-2003 09:51 AM
Configuring Virtual Hosts in Apache 2 w/ Mandrake Linux 9.1. bnscomp Linux - Software 3 10-10-2003 12:20 PM
Apache virtual hosts Mil0 Linux - Software 5 06-01-2003 11:58 PM
Apache Virtual Hosts (again) scatcat Linux - General 1 10-17-2002 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:58 AM.

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