public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] gentoo apache virtual domains setup
@ 2005-12-31 10:14 michael
  2005-12-31 10:24 ` michael
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: michael @ 2005-12-31 10:14 UTC (permalink / raw
  To: gentoo-user

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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] gentoo apache virtual domains setup
  2005-12-31 10:14 [gentoo-user] gentoo apache virtual domains setup michael
@ 2005-12-31 10:24 ` michael
  2005-12-31 12:15   ` Etaoin Shrdlu
  2005-12-31 15:42 ` [gentoo-user] " Edwin Kapauni
  2006-01-01 14:47 ` [gentoo-user] " Francesco Riosa
  2 siblings, 1 reply; 7+ messages in thread
From: michael @ 2005-12-31 10:24 UTC (permalink / raw
  To: gentoo-user

I should add that I'm doing virtual domains by name, not ip address.

Also I see some references to the "vhosts" USE flag, which seems
related, but poorly documented. Any pointers on this?

M


On Sat, 31 Dec 2005, michael@michaelshiloh.com 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
> -- 
> gentoo-user@gentoo.org mailing list
>
>
>
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] gentoo apache virtual domains setup
  2005-12-31 10:24 ` michael
@ 2005-12-31 12:15   ` Etaoin Shrdlu
  2006-01-01  1:16     ` michael
  0 siblings, 1 reply; 7+ messages in thread
From: Etaoin Shrdlu @ 2005-12-31 12:15 UTC (permalink / raw
  To: gentoo-user

On Saturday 31 December 2005 11:24, michael@michaelshiloh.com wrote:

> I should add that I'm doing virtual domains by name, not ip address.
>
> Also I see some references to the "vhosts" USE flag, which seems
> related, but poorly documented. Any pointers on this?

Carefully read the man page for webapp-config (emerge webapp-config, but 
you should already it installed). As far as I understand, the "vhost" 
flag controls whether webapp-config should be automatically run or not 
when a web application is emerged (ie, if "vhost" is set then 
webapp-config is NOT automatically run and you have to run it yourself 
manually to install the application into the proper virtualhost).

HTH
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-user]  Re: gentoo apache virtual domains setup
  2005-12-31 10:14 [gentoo-user] gentoo apache virtual domains setup michael
  2005-12-31 10:24 ` michael
@ 2005-12-31 15:42 ` Edwin Kapauni
  2006-01-01  1:17   ` michael
  2006-01-01 14:47 ` [gentoo-user] " Francesco Riosa
  2 siblings, 1 reply; 7+ messages in thread
From: Edwin Kapauni @ 2005-12-31 15:42 UTC (permalink / raw
  To: gentoo-user

michael@michaelshiloh.com 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) 
Why don't you use the original docs[1]?
They are not too bad, I think.
[1]<http://httpd.apache.org/docs/2.2/en/vhosts/>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] gentoo apache virtual domains setup
  2005-12-31 12:15   ` Etaoin Shrdlu
@ 2006-01-01  1:16     ` michael
  0 siblings, 0 replies; 7+ messages in thread
From: michael @ 2006-01-01  1:16 UTC (permalink / raw
  To: gentoo-user



On Sat, 31 Dec 2005, Etaoin Shrdlu wrote:

> On Saturday 31 December 2005 11:24, michael@michaelshiloh.com wrote:
>
>> I should add that I'm doing virtual domains by name, not ip address.
>>
>> Also I see some references to the "vhosts" USE flag, which seems
>> related, but poorly documented. Any pointers on this?
>
> Carefully read the man page for webapp-config (emerge webapp-config, but
> you should already it installed). As far as I understand, the "vhost"
> flag controls whether webapp-config should be automatically run or not
> when a web application is emerged (ie, if "vhost" is set then
> webapp-config is NOT automatically run and you have to run it yourself
> manually to install the application into the proper virtualhost).

Thanks Etaoin,

I'll read the man page you describe. Thanks for the pointer.

Michael
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user]  Re: gentoo apache virtual domains setup
  2005-12-31 15:42 ` [gentoo-user] " Edwin Kapauni
@ 2006-01-01  1:17   ` michael
  0 siblings, 0 replies; 7+ messages in thread
From: michael @ 2006-01-01  1:17 UTC (permalink / raw
  To: gentoo-user



On Sat, 31 Dec 2005, Edwin Kapauni wrote:

> michael@michaelshiloh.com 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) 
> Why don't you use the original docs[1]?
> They are not too bad, I think.
> [1]<http://httpd.apache.org/docs/2.2/en/vhosts/>


Thanks Edwin,

You are correct, the original docs are quite good. I'll soon find out if
gentoo introduces any differences.

Michael
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] gentoo apache virtual domains setup
  2005-12-31 10:14 [gentoo-user] gentoo apache virtual domains setup michael
  2005-12-31 10:24 ` michael
  2005-12-31 15:42 ` [gentoo-user] " Edwin Kapauni
@ 2006-01-01 14:47 ` Francesco Riosa
  2 siblings, 0 replies; 7+ messages in thread
From: Francesco Riosa @ 2006-01-01 14:47 UTC (permalink / raw
  To: gentoo-user

michael@michaelshiloh.com 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.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-01-01 14:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-31 10:14 [gentoo-user] gentoo apache virtual domains setup michael
2005-12-31 10:24 ` michael
2005-12-31 12:15   ` Etaoin Shrdlu
2006-01-01  1:16     ` michael
2005-12-31 15:42 ` [gentoo-user] " Edwin Kapauni
2006-01-01  1:17   ` michael
2006-01-01 14:47 ` [gentoo-user] " Francesco Riosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox