Quote:
Originally Posted by till
Please compare the vhost file with a working vhost file from another site and also compare the .htaccess file from this vhost with a .htaccess file from a working installation on the same server.
|
ok, here is the .htaccess from a not-working site:
Code:
# preventing hotlinking
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.*)?domain1.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpe?g|png|bmp)$ [F,NC]
Redirect 301 /category/blog http://domain1.com/
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
</IfModule>
# END WPSuperCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
here is a .htaccess from a working site:
Code:
# preventing hotlinking
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.*)?domain2.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpe?g|png|bmp)$ [F,NC]
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{HTTP:Cookie} !^.*(wordpress|comment_author_|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html.gz [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{HTTP:Cookie} !^.*(wordpress|comment_author_|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{HTTP:Cookie} !^.*(wordpress|comment_author_|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html.gz.wip -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html.gz.wip [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{HTTP:Cookie} !^.*(wordpress|comment_author_|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html.wip -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{SERVER_NAME}_%{SERVER_PORT}/$1/index.html.wip [L]
</IfModule>
# END WPSuperCache
# BEGIN WordPress
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]
#avatar rule
RewriteRule ^(.*/)?avatar/(.*) wp-content/avatar.php?file=$2 [L]
#RewriteRule ^wp-content/blogs.dir/(\d+)/themes/(.*) wp-content/blogs.dir/$1/themes/$2 [L]
#google sitemap verification
RewriteRule ^google(.*).html googleverifyfile.html
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ /$1/ [R=301,L]
# END WordPress
there are some differences but the first one is wordpress the second one is wpmu, still its only redirect and rewrites.
Now a non working vhost file:
Code:
<Directory /var/www/domain1.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/clients/client1/web7/web
ServerName domain1.com
ServerAlias www.domain1.com
ServerAdmin webmaster@domain1.com
ErrorLog /var/log/ispconfig/httpd/domain1.com/error.log
<Directory /var/www/domain1.com/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web7/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
# suphp enabled
<Directory /var/www/clients/client1/web7/web>
suPHP_Engine on
# suPHP_UserGroup web7 client1
AddHandler x-httpd-suphp .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-suphp
</Directory>
</VirtualHost>
and here is a working vhost:
Code:
<Directory /var/www/domain2.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domain2.com/web
ServerName domain2.com
ServerAlias *.domain2.com
ServerAdmin webmaster@domain2.com
ErrorLog /var/log/ispconfig/httpd/domain2.com/error.log
<Directory /var/www/domain2.com/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web9/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
# suexec enabled
SuexecUserGroup web9 client1
# php as fast-cgi enabled
<Directory /var/www/domain2.com/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web9/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Recent comments
1 day 8 hours ago
1 day 13 hours ago
1 day 18 hours ago
1 day 20 hours ago
2 days 10 hours ago
2 days 10 hours ago
2 days 15 hours ago
2 days 22 hours ago
2 days 22 hours ago
3 days 5 min ago