WordPress.org

Ready to get started?Download WordPress

Forums

403 for Multisite installation (4 posts)

  1. ddelizia
    Member
    Posted 1 year ago #

    Hi All,
    I'm facing a problem for a localhost installation of wordpress multisite on my mac 10.8. I decided to install wordpress with subdomains so my virtualhost configuration is the following:

    <VirtualHost *:80>
            UseCanonicalName    Off
    
            ServerAdmin email@email.com
    
            ServerAlias *.ddelizia.loc ddelizia.loc
            ServerName www.ddelizia.loc
            DocumentRoot /Users/ddelizia/Sites/wordpress_ms/
    
            Options All
            RewriteEngine On
            RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1
    
            <Directory />
                    Options FollowSymLinks
                    AllowOverride All
            </Directory>
    
            php_admin_flag allow_url_fopen on
    
            ErrorLog "/Users/ddelizia/Sites/wordpress_ms/error_log"
            CustomLog "/Users/ddelizia/Sites/wordpress_ms/access_log" common
    </VirtualHost>

    that allow me to access the subdomains. but when I try to access a page if I set up a permalink differente then the default I get the 403 problem:

    Forbidden
    You don't have permission to access /wp-admin/upload.php on this server.

    So I added to the wordpres base folder (/Users/ddelizia/Sites/wordpress_ms/) the .htaccess the code specified during the installation:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    But in this case I cannot even access to the the main domain and I get 403 error, so I also tried to give all the perrmissions (777) to the root directory but the result is the same.

    Do you have any idea on how to solve this problem?

    Thanks in advance
    Danilo

  2. RewriteRule ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1

    What's that for? I've never see it before.

  3. ddelizia
    Member
    Posted 1 year ago #

    Sorry that was just a test. I added that rule to test the upload, anyway I took off that line but the result is the same... Any Idea on what can cause that behavior?

    Thanks

  4. Two thoughts.

    In httpd.conf, change AllowOverride All to AllowOverride Options All

    and in your .htaccess, add this at the top:

    Options +FollowSymLinks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags