The MU forums have moved to WordPress.org

404 Error on Hello World and all other posts (19 posts)

  1. marclzipca
    Member
    Posted 17 years ago #

    I'm getting a 404 Error on the Hello World and all other posts after installing MU.

    Running:

    - mysql Ver 14.7 Distrib 4.1.20
    - PHP 4.3.9 (cgi)
    - Apache/2.0.52 (Red Hat)
    - mod_rewrite and FollowSymlinks *seem* to be enabled

    - bbpress is working fine on the same server
    - I have reset permalinks to defaults many times

    - see the example: http://blogs.zip.tv (click on any posts)

    Thanks for any help.

  2. andrea_r
    Moderator
    Posted 17 years ago #

    the php as cgi might be doing it.

    Also, did you set up wildcard domains / vhosts?

  3. marclzipca
    Member
    Posted 17 years ago #

    Hi Andrea,

    Does PHP need to be installed as ISAPI for Wordpress MU?

    Our plan wasn't to use vhosts.. we wanted to use folders. Most of the site shows the use of folders, however the "create a blog" section asks the user to create it as a vhost. It's a little bit odd.

    Should I just delete everything and re-install wordpress?

    Thanks,

    -- Marc

  4. marclzipca
    Member
    Posted 17 years ago #

    Quick update... PHP is not as CGI as originally thought, it is installed as an Apache module. I also noticed configuration problems in the httpd.conf so I'm asking our server admin to update it and we'll see if that helps.

  5. drmike
    Member
    Posted 17 years ago #

    The site times out for me.

    Most of the site shows the use of folders, however the "create a blog" section asks the user to create it as a vhost.

    Something's up if you're seeing that though.

  6. marclzipca
    Member
    Posted 17 years ago #

    Alright... I've re-installed MU from scratch, corrected the httpd.config and I still have the same problem -- Anytime you click on a post (ex: xxxxxxxx.xxx/blog/2007/02/01/hello-world/), I get this error:

    Not Found

    The requested URL /blog/2007/01/31/test-post/ was not found on this server.
    Apache/2.0.52 (Red Hat) Server at blogs.zip.tv Port 80

    *NOTE: The server isn't public right now so you won't be able to access it. Any other tips welcomed!

  7. marclzipca
    Member
    Posted 17 years ago #

    Other question: Do we need to add "ServerAlias *.domain.tld" in the httpd.conf if we use folders and not subdomains? Our admin hasn't added it because we are not using the sub-domains.

  8. lunabyte
    Member
    Posted 17 years ago #

    I smell an htaccess problem.

  9. marclzipca
    Member
    Posted 17 years ago #

    Here is my .htaccess file:

    RewriteEngine On
    RewriteBase /

    # Rewrite http://www.domain.com to domain.com
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    #uploaded files
    RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]

    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]

  10. lunabyte
    Member
    Posted 17 years ago #

    However, while that's all fine and dandy, index.php isn't getting control of the request.

    Which is evident since the "usual" apache error is being displayed instead of the usual WP 404.

    Here's what goes down on a request, in a nutshell.

    It comes in, apache checks the .htaccess file if there is one. There is in this case.

    According to the .htaccess file, it first cleans the www out of the url if it exists.

    Next, it looks to see if it's a request for a file from someones "files" directory. If that is true, then it passes control over to blogs.php with parameters to allow it to serve the correct file.

    If that isn't the case, then it looks to see if the request is for a legitimate file or directory. Meaning, it physically exists on the box.

    If that isn't the case, then it looks to see if the request is for a wp- type file (wp-signup, wp-activate, etc). And either passes control to it, or keeps moving on to the final "if all else fails" option.

    Hand control over to index.php, and let it figure out what to do with the request.

    In the case of a permalink, as per your example, control should be passed to index.php for it to work it's "magic" and pull up the content.

    However, it isn't being given the chance to do so. This is evident by apache producing the 404.

    Essentially, what's going on isn't being caused by MU, or so it seems. It's something in the set up, configuration, or something like that.

    That being said, exactly what's going on here? How is it set up? How are you accessing it? With what domain?

    If you're running subdirectories, vice a subdomain install (although subdomains are recommended), then you don't need any of the wildcard stuff. It says so in the readme file.

    If you were trying subdomains, on Apache 2 you wouldn't be adding the wildcard stuff to the httpd.conf file, as that's not where the virtual directories are handled in A2 to begin with.

    So, at this point, I'm inclined to put the mark on the server and its not being properly setup and configured.

    Without being able to see the site you're trying to put together, to see what's happening on the pages and what's going on, there isn't much help that can be given because anything is purely a "guess".

    If you need help, cool. But you have to help us help you. And being secretive doesn't cut it when something is wrong and you need some help. If we can't see the problem, then any type of a solution that ends up working is due to a lucky guess.

  11. marclzipca
    Member
    Posted 17 years ago #

    It's not a matter of being secretive, it's a matter of my not having the authority to make this site public. This will be a corporate site, not my personal site, and policies dictate that until this works, passes QA and staging, it won't be live. I can't change that.

    I think I've answered most of your questions already...
    ** That being said, exactly what's going on here?
    Simple:
    - Setup MU brand new MU installation
    - Click on Hello World! post
    - 404 Error I pasted
    - Try to write another post (successful)
    - Click on link to view the other post
    - same 404 error

    ** How is it set up?
    Might need to be more specific, but the server is Red Hat Linux, Apache/2.0.52, MySQL 4.1.20, PHP 4.3.9 installed as Apache module. WPMU itself is setup using subdirectories, not VHOSTS. All I've done is extract the files to the root folder and ran the install script.

    ** How are you accessing it?
    - IE 7 or Firefox 2.0

    ** With what domain?
    - blogs.zip.tv, have tried other hosts on the same server but no difference.

    ** If we can't see the problem, then any type of a solution that ends up working is due to a lucky guess.

    I don't agree... what you would see is exactly what I've described. Nothing more or less. I've pasted the entire error message and config file... can't see what else you'd need, but if you do need more information, just ask and I'll provide. However, nothing will change the fact that this site won't be publically available as I have no authority on this matter.

    Thanks for the help.

  12. lunabyte
    Member
    Posted 17 years ago #

    Well, time for you to dig in and learn apache then.

    It's not accepting the directive in the htaccess file. Index.php isn't being given the control.

    So, it's something with apache. Be it permissions, configuration, or whatever.

    Find the minimum requirements, and make sure your install meets that. Find how to configure apache, and get it set up correctly.

    Right now, something isn't right, and it's not MU.

  13. marclzipca
    Member
    Posted 17 years ago #

    For anyone who runs into this problem:

    1. Ensure that the following is set:
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride FileInfo Options

    **NOTE: There are many "AllowOverride" statements in the config file, ensure you change the correct one: the one in the root.

    2. Never take anyone else's word that this has been done, no matter how many times you ask for it :-(

  14. andrea_r
    Moderator
    Posted 17 years ago #

    "** With what domain?
    - blogs.zip.tv, have tried other hosts on the same server but no difference."

    Since it is not available to the public, you haven't pointed this domain to localhost have you?

  15. chluper
    Member
    Posted 17 years ago #

    If you have this:

    ####
    Include "/etc/httpd/sites/*.conf"

    at the end of your httpd.conf, you need to check the host info found at:

    /etc/httpd/sites/

    Insert the "AllowOverride FileInfo Options" into the appropriate host file.

    I had to do this even though I'm not running vhosts either.

  16. chluper
    Member
    Posted 17 years ago #

    I'm running Apache 1.3, PHP 5.2, MySQL 5.2

  17. slewis
    Member
    Posted 17 years ago #

    I had the same problem and fixed it by ensuring I had the following lines at the bottom of my apache2 config file (I'm running Debian).

    The top Debian vhost bit is commented out

    # Include the virtual host configurations:
    #Include /etc/apache2/sites-enabled/[^.#]*

    NameVirtualHost *
    <VirtualHost *>
    ServerAdmin slewis@foo

    ServerAlias *.moo.honk

    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride FileInfo Options
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride FileInfo Options
    Order allow,deny
    allow from all
    # Uncomment this directive is you want to see apache2's
    # default start page (in /apache2-default) when you go to /
    #RedirectMatch ^/$ /apache2-default/
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>

  18. eibrahim
    Member
    Posted 16 years ago #

  19. dgf
    Member
    Posted 16 years ago #

    hi,
    what script are you using for the reviews and how did you integrate it all. Is it all compatible etc...
    or did you have do some tweaks of your own and are you using any plugins.

About this Topic