![]() |
|
|||||||
| FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
|
|
Thread Tools | Display Modes |
|
|||
|
Hi,
I've been struggling with this for a while.. Running FreeBSD 7.1, Apache 2.2 - trying to create some vhosts for my domain - like for example mail.mydomain.net, lists.mydomain.net, etc.. This is what I've done so far - I've changed only this to /usr/local/etc/apache22/httpd.conf Code:
Listen 80 ServerAdmin admin@mydomain.net ServerName mydomain.net:80 # Virtual hosts Include etc/apache22/extra/httpd-vhosts.conf Include etc/apache22/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps And this is the /usr/local/etc/apache22/extra/httpd-vhosts.conf Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin admin@mydomain.net
DocumentRoot "/usr/local/www/apache22/data"
ServerName www.mydomain.net
ServerAlias mydomain.net www.mydomain.org
<Directory "/usr/local/www/apache22/data">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/httpd-error.log
CustomLog /var/log/httpd-access.log combined
</VirtualHost>
# Mailman mailing list domain.
#
<VirtualHost *:80>
ServerAdmin admin@mydomain.net
DocumentRoot "/usr/local/mailman"
ServerName lists.mydomain.net
ServerAlias lists.mydomain.net
ScriptAlias /cgi-bin/ "/usr/local/mailman/cgi-bin/"
ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"
Alias /pipermail "/usr/local/mailman/archives/public"
Alias /icons "/usr/local/mailman/icons"
<Directory "/usr/local/mailman">
AllowOverride All
Options FollowSymlinks
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/httpd-error.log
CustomLog /var/log/httpd-access.log combined
</VirtualHost>
This is the output from httpd -S Code:
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 www.mydomain.net (/usr/local/etc/apache22/extra/httpd-ssl.conf:74)
*:80 is a NameVirtualHost
default server www.mydomain.org (/usr/local/etc/apache22/extra/httpd-vhosts.conf:30)
port 80 namevhost www.mydomain.net (/usr/local/etc/apache22/extra/httpd-vhosts.conf:30)
port 80 namevhost lists.mydomain.net (/usr/local/etc/apache22/extra/httpd-vhosts.conf:47)
Syntax OK
Thanks!
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP 5.2.6 and Apache 1.3 | dialeight | OpenBSD Packages and Ports | 1 | 15th June 2009 03:04 AM |
| Upgrade Apache 1.3 mod_ssl to Apache 2.2 | beandip | FreeBSD Ports and Packages | 11 | 26th March 2009 08:12 PM |
| apache error .. vhosts and access | edhunter | FreeBSD General | 21 | 19th July 2008 10:24 PM |
| Apache 1.3 vs. 2.2 | windependence | FreeBSD General | 4 | 16th June 2008 10:10 PM |
| Apache SSL | mike171562 | FreeBSD General | 0 | 5th May 2008 09:41 PM |