[EMAIL PROTECTED] wrote:
> Hi,
>
> I want to serve web pages for multiple virtual domains from my gentoo
> box. The latest howto I could find
> (http://gentoo-wiki.com/HOWTO_Linux_Virtual_Server#Apache.2C_mod_php.2C_and_PHP)
>
> admits that it is out of date relative to the gentoo apach2 package.
>
> Does anyone know of a more recent howto, or have any other tips? Last
> time I implemented a virtual domains web server was on redhat 8 with
> apache 1. I'm sure things have changed.
>
> Thanks,
> Michael

This is a snippet of the config running here, don't take it as a cut and
paste ready because it survived to many upgrades and may be dirty,
instead you could mix it with the nice manuals you just readed ;-)
And the double network is because it's actually serving on two ips, you
may need ust one.


[/etc/apache2]
./mime.types
./magic
./modules.d
./modules.d/70_mod_php5.conf
./modules.d/46_mod_ldap.conf
./modules.d/40_mod_ssl.conf
./modules.d/41_mod_ssl.default-vhost.conf
./apache2-builtin-mods
./vhosts.d
./vhosts.d/vhosts.conf
./httpd.conf
./ssl
./ssl/.keep
./ssl/server.csr
./ssl/server.key
./ssl/server.crt
./conf -> .




<FILE httpd.conf>
#
# Gentoo VHosts
#
# For Gentoo we include External Virtual Hosts Files.
# Please see vhosts.d/00_default_vhost.conf for the default virtual host.
#
Include /etc/apache2/vhosts.d/*.conf
</FILE httpd.conf>


<FILE vhosts.d/vhosts.conf>

NameVirtualHost 192.168.100.80:80
NameVirtualHost 192.168.101.80:80

<VirtualHost 192.168.100.80:80 192.168.101.80:80>

    ErrorLog logs/www.mydomain1.tld_error
    CustomLog logs/www.mydomain1.tld_log common
    CustomLog logs/www.mydomain1.tld_referer referer

    DocumentRoot "/srv/www/www.mydomain1.tld"
    
    [...]
</VirtualHost>

<VirtualHost  192.168.100.80:80 192.168.101.80:80>
    ServerName www.mydomain2.tld
    ServerAlias si.pnp

    DocumentRoot /srv/www/si.pnp

    ErrorLog logs/www.mydomain2.tld_error
    CustomLog logs/www.mydomain2.tld_log common
    CustomLog logs/www.mydomain2.tld_referer referer
</VirtualHost>

## SSL ###############################################

<VirtualHost 192.168.4.80:443 192.168.5.80:443>

    ErrorLog logs/https.mydomain3.tld_error
    CustomLog logs/https.mydomain3.tld_log common
    CustomLog logs/https.mydomain3.tld_referer referer

    SSLEngine on
    SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl/server.crt
    SSLCertificateKeyFile conf/ssl/server.key

    <Files ~ "\.(cgi|shtml|phtml|php?)$">
        SSLOptions +StdEnvVars
    </Files>
    
    <Directory "/var/www/localhost/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>

    <IfModule mod_setenvif.c>
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
    </IfModule>

    <IfModule mod_log_config.c>
    CustomLog logs/ssl_request_log \
              "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteOptions inherit
    </IfModule>

</FILE vhosts.d/vhosts.conf>


regards,
Francesco R.
-- 
[email protected] mailing list

Reply via email to