WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multi-site sub-directory 404 error (4 posts)

  1. loucks14
    Member
    Posted 1 year ago #

    Installed WordPress and multi-site, can see and use main site with no issues. When I create a new site it will show up as created but when I try to view or go to admin panel I get a 404 not found error

    The requested URL /wordpress/fccc/wp-admin/ was not found on this server.

    Apache/2.2.22 (Ubuntu) Server at localhost Port 80

  2. Jacob311
    Member
    Posted 1 year ago #

    I am having problems with 404 errors on new sites as well. I don't mean to get your hopes up that there's a response to your question, but I wanted to be notified if someone answers your question.

    I assume most of our 404 problems can be traced back to something in the .htaccess file. Why do so many of us have this same problem?...Hopefully an update in the future will make this set up a bit easier.

    Good luck on yours.

  3. loucks14
    Member
    Posted 1 year ago #

    Thank you, Jacob311 for your response. It has been nice to know that there are others in the same boat (or perhaps better stated as “others with a ticket on the same Carnival Cruise Line”!) I have found many with this problem and a few that have been solved by the great help here and elsewhere on the interwebs, but I have not found any of those solution apply to me (my issues are not solved after attempting their advice) So I am going to try and include as much information as I can about my install and error(s). As always, please bear with me I am a noob to Ubuntu, LAMP and wordpress, but after having to do complete reinstalls one or nine times, I have learned a few things (i.e. don't chown /var/ ! Ya, I know, NOOOOOB!) So here is my setup:
    Ubuntu Studio 12.10 fully updated and running well (so far as I can tell)
    Installing LAMP from this Website:
    http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-12.10-lamp

    First “error” although found that this is not very severe
    * Restarting web server apache2
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

    and is easily solved by:
    sudo sh -c 'echo "ServerName localhost" >> /etc/apache2/conf.d/name' && sudo service apache2 restart

    which I found at:
    http://xubuntugeek.blogspot.com/2012/07/solved-apache2-could-not-reliably.html

    As I stated before, I am a noob and don't know how to use the “vi” text editor. (source of much irritation at first!) So I got some advice to use this:
    nano /var/www/info.php
    HAZAA!! Success. All is well http://localhost/info.php works no apparent issues...
    The next step of the install (#6) is to install PHP5 modules, he says to pick php5-mysql package as well as “others” I don't have the first clue as to what I need so I install what was suggested:
    php5-mysql, php5-curl, php5-gd, php5-intl, php-pear, php5-imagick, php5-imap, php5-mcrypt, php5-memcache, php5-ming, php5-ps, php5-pspell, php5-recode, php5-snmp, php5-sqlite, php5-tidy, php5-xmlrpc and php5-xsl

    Finished with install, everything works. I can access the mySQL with PHPmyadmin. Joy.
    Next, I will create a database in mySQL using PHPmyadmin. I follow these instructions:
    http://www.youtube.com/watch?v=aVHb0e8HMmo

    All seems well.
    Installing wordpress. Using the terminal according to these instructions:
    http://stackoverflow.com/questions/13316969/wordpress-installation-on-ubuntu-12-10
    Changed ownership and permissions of the www file using these instructions:
    https://www.digitalocean.com/community/articles/how-to-install-wordpress-on-ubuntu-12-04

    Create and change the wp-config file:
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */ define('DB_NAME', 'my wp database name');
    /** MySQL database username */ define('DB_USER', 'my wp user name');
    /** MySQL database password */ define('DB_PASSWORD', 'my wp database user password');
    /** MySQL hostname */ define('DB_HOST', 'localhost');
    /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');

    Changed everything here to match what I set up in PHPmyadmin for the database in MySQL.
    Go to localhost/wordpress/wp-admin/install.php and finish wordpress install.
    OK heres a change from last time: Found in many foruns suggest to see if prettypermalinks work multisite should too. In other tries WP could not write to the htaccess file and I had to do manually. Not so this time. Well here we go to the final steps fingers crossed...
    Goto wp-config file and add:
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    Above the /* That's all, stop editing! Happy blogging. */
    Made sure apache2 mod_rewrite is enabled:
    http://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2
    Add this to the wp-config file:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/wordpress/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    Above the /* That's all, stop editing! Happy blogging. */
    And add:

    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    to the htaccess file. So that my htaccess file reads as follows:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>

    # END WordPress

    Create a new website:
    Site Address
    localhost/wordpress/fccc
    Only lowercase letters (a-z) and numbers are allowed.
    Site Title
    Full Circle Consultaions
    Admin Email
    someone@samplemail.com ( used a real one not this)
    A new user will be created if the above email address is not in the database.
    The username and password will be mailed to this email address.

    And here is the error....
    Not Found
    The requested URL /wordpress/fccc/wp-admin/ was not found on this server.
    Apache/2.2.22 (Ubuntu) Server at localhost Port 80

    OK well I'm done. The main site works fine so far, I guess I'll just wait for someone to fix this issue. Sorry again for this being such a long post. If I broke any rules, please forgive me just trying to help everyone track down the problem.

  4. loucks14
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic