Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #41  
Old 3rd June 2009, 09:58
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,781
Thanks: 840
Thanked 5,610 Times in 4,421 Posts
Default

This tutorial is for a private server and not ispconfig or for a hosting enviroment. As long as you are the only user, then AllowOverride all is fine.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #42  
Old 4th June 2009, 19:15
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

Quote:
Originally Posted by till View Post
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>
Reply With Quote
  #43  
Old 9th June 2009, 15:00
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
 
Default

I figured out my problem, had nothing to do with ispconfig after all.

it seems the wordpress built in updater, sets file permissions wrong. Must check what they are set to, but it breaks suPhp somehow.

If I use plugin central wordpress plugin for updating all seems fine :-)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Host is not allowed to connect to this MySQL server'? mcroteau105 HOWTO-Related Questions 5 7th September 2009 13:52
ftp is very slow and asks for user/passwd continuously chico58 Installation/Configuration 7 8th October 2008 13:43
how to enable Mod Rewrite AngelDrago Installation/Configuration 9 11th August 2007 00:20
Ispconfig and Virtuemart shajazzi Installation/Configuration 7 21st February 2006 21:25
Number of allowed domains times 2? cstone Installation/Configuration 9 11th October 2005 03:06


All times are GMT +2. The time now is 16:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.