WordPress.org

Ready to get started?Download WordPress

Forums

Multisite installed on AWS - Permalinks not working (19 posts)

  1. lumenbeing
    Member
    Posted 3 years ago #

    This installation began as a Bitnami AMI.
    After install, I configured multisite and got that working, following all of the instructions I found online.
    Next step is to install buddypress, but I need to have "pretty" permalinks in order to do that.
    When I change the WordPress permalink setting I get 404 on all my pages.
    This is what I have in the htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    and here is the httpd.conf:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. Your .htaccess may not bein read correctly. Do the subdomains themselves work? I mean can you get to sub.domain.com?

  3. lumenbeing
    Member
    Posted 3 years ago #

    Thanks for the response. Yes. Sub-domains are working. Its just the permalinks that are causing me trouble.

  4. lumenbeing
    Member
    Posted 3 years ago #

    Didn't know about the forum rules for pasting in loads of code. Here is the httpd.conf:
    Embedded Code For Paste ID: Bs35eVjN

  5. lumenbeing
    Member
    Posted 3 years ago #

    er...

    <script src="http://pastebin.com/embed_js.php?i=Bs35eVjN"></script>
  6. Are there any lines in your error log related to this?

  7. lumenbeing
    Member
    Posted 3 years ago #

    Yep. I've got a bunch of these:
    [Thu Jan 27 12:30:00 2011] [error] [client 123.125.71.107] File does not exist: /opt/bitnami/apache2/htdocs/interactive-post
    [Thu Jan 27 12:30:03 2011] [error] [client 123.125.71.111] File does not exist: /opt/bitnami/apache2/htdocs/test-post
    [Thu Jan 27 12:30:08 2011] [error] [client 123.125.71.115] File does not exist: /opt/bitnami/apache2/htdocs/feed
    [Thu Jan 27 12:30:12 2011] [error] [client 123.125.71.107] File does not exist: /opt/bitnami/apache2/htdocs/welcome
    [Thu Jan 27 12:30:16 2011] [error] [client 123.125.71.103] File does not exist: /opt/bitnami/apache2/htdocs/about-2

  8. lumenbeing
    Member
    Posted 3 years ago #

    I think there is a clue here :)

  9. Yeah, your symlinks aren't being honored... but looking at httpd.conf they SHOULD be. I'm not as good with that as I could be.

    BTW, the link you wanted was just: http://pastebin.com/Bs35eVjN No embedding here :)

    Anyway, at a WILD guess, this section <Directory "/opt/bitnami/apache2/htdocs"> (line 187)

    has your options as Options Indexes FollowSymLinks

    Try changing that to Options Indexes FollowSymLinks MultiViews and restarting the httpd service.

  10. lumenbeing
    Member
    Posted 3 years ago #

    Ipstenu, thanks for taking an interest in my issue. It is really holding up development for this site. Going to try your suggestion now. Oh and thanks for showing me how to correctly form the pastebin link.
    BTW there is also a a httpd-vhost.conf file where the wildcard lives. It is linked to at the end of htpd.conf
    Maybe check it over and see if you spot any problems there.

    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80
    <Directory />
        Options FollowSymLinks
        AllowOverride All
        Order deny,allow
        Deny from all
    </Directory>
    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for all requests that do not
    # match a ServerName or ServerAlias in any <VirtualHost> block.
    #
    <VirtualHost *:80>
        ServerAdmin chris@rebel-seo.com.com
        DocumentRoot "/opt/bitnami/apache2/htdocs"
        ServerName echotreemedia.com
        ServerAlias *.echotreemedia.com
    
    #    ErrorLog "logs/dummy-host.example.com-error_log"
    #    CustomLog "logs/dummy-host.example.com-access_log" common
    </VirtualHost>
  11. That should be fine. I mean, the wildcard subdomains are working :)

    http://qweqweqw.echotreemedia.com kicks you to http://echotreemedia.com/wp-signup.php?new=qweqweqw and that's what's supposed to happen, so THAT'S alright :D

  12. lumenbeing
    Member
    Posted 3 years ago #

    Yep that part is working fine. Just wondering about the way options are set here. Based on your wild guess.

  13. lumenbeing
    Member
    Posted 3 years ago #

    Okay so making the change you suggested did not solve the issue. But I think we're on the right track now. Obviously I'm way out of my depth with apache config, but I found this interesting note on http://httpd.apache.org/docs/2.2/mod/core.html#options

    Normally, if multiple Options could apply to a directory, then the most specific one is used and others are ignored; the options are not merged. (See how sections are merged.) However if all the options on the Options directive are preceded by a + or - symbol, the options are merged. Any options preceded by a + are added to the options currently in force, and any options preceded by a - are removed from the options currently in force.

    Maybe I need plus symbols?

  14. lumenbeing
    Member
    Posted 3 years ago #

    Okay that didn't work either...

  15. lata_dev
    Member
    Posted 3 years ago #

    Hi lumenbeing

    Did you get a solution to this? I am porting my site to AWS but am stuck due to this issue. If you found a solution, would be great if you can post it here.

    Thanks.

  16. kediacorp
    Member
    Posted 3 years ago #

    edit httpd.conf

    comment out AllowOverride None in Directory / and /var/www

    change .htaccess to this:

    Options +FollowSymlinks
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    set correct permission on .htaccess

    restart apache

    update permalink on corresponding blog(s)

    log out and log back in

    pour mountain dew.

  17. lata_dev
    Member
    Posted 3 years ago #

    Since its a multisite installation, there are already some lines in the .htaccess file according to the n/w configuration settings.

    Should we add these lines after that or before? The contents are mentioned in the first post of this thread.

  18. Before.

    It should go

    # Fixes
    Options +FollowSymlinks
    
    # BEGIN WordPress
    [Whatever yours is]
    # END WordPress
  19. lata_dev
    Member
    Posted 3 years ago #

    kediacorp, Ipstenu you're my heroes!!! Thank you :)

Topic Closed

This topic has been closed to new replies.

About this Topic