DeveloperSide.NET Forums
July 13, 2020, 05:39:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: What is wrong with my vhost configuration  (Read 4965 times)
0 Members and 1 Guest are viewing this topic.
Wilz
Member
*
Posts: 26


View Profile
« on: July 26, 2006, 09:55:00 AM »

I'm having trouble trying to access my vhost websites from an outside connection could you please view my configuration and tell me what I'm doing wrong as to why I can't access my other websites and also why only the default (first websit) in the configuration is only being seen when typing in the other dns names. Also would it be possible for you to tell me what address I should use to edit the vhost website from within a browser, such as http://localhost/?. My configurations are listed below.

Listen 80
ServerRoot "/www/Apache2"
DocumentRoot "/www/webroot"

ServerName localhost:80
ServerAdmin admin@localhost

ServerSignature On
ServerTokens Full

DefaultType text/plain
AddDefaultCharset ISO-8859-1

UseCanonicalName Off

HostnameLookups Off

ErrorLog logs/error.log
LogLevel warn

PidFile logs/httpd.pid

Timeout 300

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15


<IfModule mpm_winnt.c>
   ThreadsPerChild 250
   MaxRequestsPerChild 0
</IfModule>


LoadModule access_module modules/mod_access.so
#LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
#LoadModule asis_module modules/mod_asis.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 autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
#LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
LoadModule headers_module modules/mod_headers.so
#LoadModule imap_module modules/mod_imap.so
#LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
#LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
<IfDefine SSL>
   LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
LoadModule logio_module modules/mod_logio.so
LoadModule deflate_module modules/mod_deflate.so

LoadFile "/www/perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so
PerlRequire "/www/Apache2/conf/extra.pl"

LoadFile "/www/php/php4ts.dll"
LoadModule php4_module /www/php/php4apache2.dll


<Location />
   <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE text/html text/plain text/css
      <IfModule mod_headers.c>
         Header append Vary User-Agent
      </IfModule>
   </IfModule>
</Location>


<Directory />
   Options None
   AllowOverride None
   Order allow,deny
   Deny from all
</Directory>


<Directory "/www/webroot">
   Order allow,deny
   Allow from all
</Directory>


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

   Alias /private "/www/private"

   <Directory "/www/private">
      <IfModule mod_autoindex.c>
         Options Indexes
      </IfModule>

      Order allow,deny
      Allow from all

      AuthType Basic
      AuthName "Private Access"
      AuthUserFile "/www/private/.htpasswd"
      require valid-user
   </Directory>
</IfModule>


<IfModule mod_cgi.c>
   ScriptAlias /cgi-bin/ "/www/cgi-bin/"

   <Directory "/www/cgi-bin">
      Options None
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>
</IfModule>


Alias /phpMyAdmin "/www/phpMyAdmin"

<Directory "/www/phpMyAdmin">
   Options None
   AllowOverride None
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
</Directory>


<Directory "/www/webroot/stats">
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
</Directory>


<IfModule mod_log_config.c>
   LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-agent}i\"" combined
   CustomLog logs/access.log combined
   <IfModule mod_deflate.c>
      DeflateFilterNote Input instream
      DeflateFilterNote Output outstream
      DeflateFilterNote Ratio ratio
      LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
      CustomLog logs/deflate.log deflate
   </IfModule>
</IfModule>


<IfModule mod_dir.c>
   DirectoryIndex index.html index.php
</IfModule>


<IfModule mod_mime.c>
   TypesConfig conf/mime.types
   AddType application/x-compress .Z
   AddType application/x-gzip .gz .tgz
   AddType application/x-rar-compressed .rar
   <IfModule sapi_apache2.c>
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php-source .phps
   </IfModule>
</IfModule>


<IfModule mod_setenvif.c>
   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
   BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
   BrowserMatch "^gnome-vfs" redirect-carefully
   <IfModule mod_deflate.c>
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
   </IfModule>
</IfModule>


<IfModule mod_status.c>
   ExtendedStatus On
   <Location /server-status>
      SetHandler server-status
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
   </Location>
</IfModule>


<IfModule mod_info.c>
   <Location /server-info>
      SetHandler server-info
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
   </Location>
</IfModule>


<IfModule mod_perl.c>
   PerlModule Apache::Status
   <Location /perl-status>
      SetHandler perl-script
      PerlResponseHandler Apache::Status
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
   </Location>
</IfModule>


<IfModule mod_ssl.c>
   Include conf/ssl.conf
</IfModule>


##### Start -- mod_perl Hello example, \www\perl\site\lib\Apache\Hello.pm
#
<IfModule mod_perl.c>
   PerlModule Apache::Hello
   <Location /hello>
      SetHandler modperl
      PerlResponseHandler Apache::Hello
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
   </Location>
</IfModule>
#
##### End -- mod_perl Hello example
NameVirtualHost localhost:80

<VirtualHost *:80>
   ServerName compshop.ath.cx
   ServerAlias compshop *.compshop
   DocumentRoot "/www/webroot/xtcommerce"
</VirtualHost>

<VirtualHost *:80>
        ServerName linkrotater.shacknet.nu
   ServerAlias linkrotater *.linkrotater.shacknet
   DocumentRoot "/www/webroot/linkrotater"
</VirtualHost>

<VirtualHost *:80>
        ServerName geeklog.is-a-geek.com
   ServerAlias geeklog *.geeklog
   DocumentRoot "/www/webroot/public_html"
</VirtualHost>
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: July 26, 2006, 11:54:30 AM »

Code:

NameVirtualHost localhost:80

<VirtualHost *:80>
ServerName compshop.ath.cx
ServerAlias compshop *.compshop
DocumentRoot "/www/webroot/xtcommerce"
</VirtualHost>


Should be...

Code:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName compshop.ath.cx
DocumentRoot "/www/webroot/xtcommerce"

<Directory "/www/webroot/xtcommerce">
   Order Allow,Deny
   allow from All
</Directory>

</VirtualHost>


Save changes. Restart Apache.

You do not really edit websites via a browser. You can, but it requires the use of IE 'open as web folders' and mod_dav. And even then its limited.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!