struggling with virtual hosting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi 

I have been trying to get virtual hosting working under RH9.0/Apache2.0


I have three virtual hosts 

localhost
dolibarr
calendrier

corresponding respectively to
/var/www/html
/var/www/dolibarr
/var/www/calendrier

localhost redirects to /var/www/html/index.html, fine
dolibarr redirects also to /var/www/html/index.html, not fine, it should
be /var/www/dolibarr/index.html

and with calendrier the server says it cannot connect to
www.calendrier.com, not fine at all

I tried to setup thing with the RH GUI for HTTP server it did not work
at all 

I did it manually and got the result previously mentioned

I would like 
http://localhost --> /var/www/html/index.html
http://dolibarr --> /var/www/dolibarr/index.html
http://calendrier --> /var/www/calendrier/index.html

here is part of my httpd.conf file

Thanks in advance

Philippe

~~~~~~~~~~~beg. httpd.conf
ServerTokens OS

ServerRoot "/etc/httpd"

PidFile "/var/run/httpd.pid"

TimeOut 300

KeepAlive false

MaxKeepAliveRequests 100

KeepAliveTimeout 15

Listen *:80

Include conf.d/*.conf

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so

User apache
Group apache

ServerAdmin conseil@xxxxxxxxxxxxx

ServerName asus

UseCanonicalName on

DocumentRoot "/var/www/html"

<LocationMatch "^/$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

<IfModule mod_userdir.c>
    UserDir "disable"
</IfModule>

DirectoryIndex 

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

TypesConfig "/etc/mime.types"

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

HostNameLookups Off

ErrorLog "/var/log/httpd/error_log"

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access_log combined

ServerSignature on

Alias /icons/ "/var/www/icons/"

Alias /manual "/var/www/manual"

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<IfModule mod_cgid.c>

</IfModule>

IndexOptions FancyIndexing VersionSort NameWidth=*

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddType application/x-tar .tgz
AddHandler imap-file map
AddHandler type-map var
AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider"
redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully

NameVirtualHost *

LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"

<VirtualHost localhost>
 	DocumentRoot /var/www/html 
 	ServerName localhost
	DirectoryIndex index.php index.html index.htm index.shtml 
 	LogLevel debug
 	HostNameLookups off
</VirtualHost>

<VirtualHost dolibarr>
 	DocumentRoot /var/www/dolibarr 
 	ServerName dolibarr
</VirtualHost>

<VirtualHost calendrier>
 	DocumentRoot /var/www/calendrier 
 	ServerName calendrier
</VirtualHost>

<Directory "/">
        Options FollowSymLinks
        AllowOverride None
</Directory>

<Directory "/var/www/html">
        Options Indexes Includes FollowSymLinks
        AllowOverride None
        Allow from from all
        Order allow,deny
</Directory>

<Directory "/var/www/icons">
        Options Indexes MultiViews
        AllowOverride None
        Allow from from all
        Order allow,deny
</Directory>

<Directory "/var/www/cgi-bin">
        Options ExecCGI
        AllowOverride None
        Allow from from all
        Order allow,deny
</Directory>
~~~~~~~~~~~end htpd.conf


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux