eZ Community » Forums » Setup & design » Proper setup of httpd.conf
expandshrink

Proper setup of httpd.conf

Proper setup of httpd.conf

Thursday 04 September 2003 3:04:16 pm - 3 replies

Hi,

I've just installed eZ P on our server with host match and am now looking to find out what I should put in the httpd.conf file in order to point all domains for that server (except one) to the eZ P installation.

Does there exists any documentation on this subject, or does anyone have httpd.conf-file lying around that does this?

Thanks in advance !

Sincerely,

Eirik Johansen
Netmaking AS

Saturday 06 September 2003 12:24:06 pm

look at www.apache.org to find out how to setup your webserver.

I think you will have to setup a virtual host for each domain. Here's what I put in my local httpd.conf for Apache 1.3 to run 4 development domains on my local box:

*********************************************
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

# Virtual Hosts System VL Local

<VirtualHost 127.0.0.1>
ServerName priv.system_vl.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/system_vl/ezpublish"
ErrorLog logs/system_vl_error_log
TransferLog logs/system_vl_access_log

Options FollowSymLinks
RewriteLog logs/system_vl_rewrite_log
RewriteEngine On

#V.L 13-03-03: Rewrite rules for our 3 SSL-domains within the scope of this VH:
#1. Do not redirect inline-requests for html-rsources like css, js, images
#2. redirect non-inline URIs with unknown SSL host name to public non-SSL VH
#3. redirect non-inline requests that do not target one of our SSL-directories to public non-SSL VH
RewriteCond %{HTTP_HOST} ^priv.system_vl.local$
RewriteCond %{REQUEST_URI} ^/(admin|members).*
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php [L]
RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|js|css|html)$
RewriteRule .* http://www.system_vl.local/ [R]

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/system_vl/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName www.system_vl.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/system_vl/ezpublish"
ErrorLog logs/system_vl_error_log
TransferLog logs/system_vl_access_log

Options FollowSymLinks
RewriteLog logs/system_vl_rewrite_log
RewriteEngine On
#V.L 13-03-03: Redirect any resource request except special inlined file resources through our php-processor
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/system_vl/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

# Virtual Hosts Leportal Local

<VirtualHost 127.0.0.1>
ServerName priv.leportal.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/leportal/ezpublish"
ErrorLog logs/leportal_error_log
TransferLog logs/leportal_access_log

Options FollowSymLinks
RewriteLog logs/leportal_rewrite_log
RewriteEngine On

#V.L 13-03-03: Rewrite rules for our 3 SSL-domains within the scope of this VH:
#1. Do not redirect inline-requests for html-rsources like css, js, images
#2. redirect non-inline URIs with unknown SSL host name to public non-SSL VH
#3. redirect non-inline requests that do not target one of our SSL-directories to public non-SSL VH
RewriteCond %{HTTP_HOST} ^priv.leportal.local$
RewriteCond %{REQUEST_URI} ^/(admin|members).*
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php [L]
RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|js|css|html)$
RewriteRule .* http://www.leportal.local/ [R]

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/leportal/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName www.leportal.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/leportal/ezpublish"
ErrorLog logs/leportal_error_log
TransferLog logs/leportal_access_log

Options FollowSymLinks
RewriteLog logs/leportal_rewrite_log
RewriteEngine On
#V.L 13-03-03: Redirect any resource request except special inlined file resources through our php-processor
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/leportal/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

# Virtual Hosts GTCT Local

<VirtualHost 127.0.0.1>
ServerName priv.gtct.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/gtct/ezpublish"
ErrorLog logs/gtct_error_log
TransferLog logs/gtct_access_log

Options FollowSymLinks
RewriteLog logs/gtct_rewrite_log
RewriteEngine On

#V.L 13-03-03: Redirect any resource request except special inlined file resources through our php-processor
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/gtct/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName www.gtct.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/gtct/ezpublish"
ErrorLog logs/gtct_error_log
TransferLog logs/gtct_access_log

Options FollowSymLinks
RewriteLog logs/gtct_rewrite_log
RewriteEngine On
#V.L 13-03-03: Redirect any resource request except special inlined file resources through our php-processor
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/gtct/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

# Virtual Hosts BSZ Local

<VirtualHost 127.0.0.1>
ServerName priv.bsz.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/showroom/bsz/ezpublish"
ErrorLog logs/bsz_error_log
TransferLog logs/bsz_access_log

Options FollowSymLinks
RewriteLog logs/bsz_rewrite_log
RewriteEngine On
#V.L 13-03-03: Redirect any resource request except special inlined file resources through our php-processor
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/showroom/bsz/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName www.bsz.local
DocumentRoot "C:/Programme/ApacheGroup/Apache/htdocs/showroom/bsz/ezpublish"
ErrorLog logs/bsz_error_log
TransferLog logs/bsz_access_log

Options FollowSymLinks
RewriteLog logs/bsz_rewrite_log
RewriteEngine On
#V.L 13-03-03: Redirect any resource request except special inlined file resources through our php-processor
RewriteRule !\.(gif|jpg|png|js|css|html)$ /index.php

<Directory "C:/Programme/ApacheGroup/Apache/htdocs/showroom/bsz/ezpublish">
Order deny,allow
allow from all
</Directory>
</VirtualHost>

Tuesday 25 November 2003 10:40:45 am

hi,Volker
can u use server name in browser to instead of 127.0.0.1 as url?
now i config vhost on my win2k ,but when i input servername(which is not a public domain name), ie will go to search on the internet, then cannot find result?
i want to ask u that how can u use vhost on a alone pc?
thank u!

Tuesday 25 November 2003 11:04:34 am

Kevin,

Just add the hostnames to /etc/hosts and the resolver will look in there before checking dns.

On windows 2k the hosts file lives in c:\winnt\system32\drivers\etc\hosts

On n*x a 'man hosts' will tell you all you need to know.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from