Jump to content

PW not installing correctly - admin not found


Jamie Gordon
 Share

Recommended Posts

Hi guys, 

having a bit of a strange issue here - I've installed at least a dozen copies of process wire for various websites firstly on my localhost using MAMP and later transferring it to a server.

I'm trying to install a fresh copy to my localhost, I go through the install process and get the success message as usual (see screenshot) but whenever I try to access /admin/ - it cannot be found. Any ideas?

Screen%20Shot%202013-09-06%20at%2010.21.

Screen%20Shot%202013-09-06%20at%2010.24.

Link to comment
Share on other sites

Looks like a .htaccess or folder location problem

From Ryan

When you get 404s for everything but the homepage, that means the .htaccess file is not working. Edit your .htaccess file and paste in some garbage at the top, like "alkjaelfkjaef" and save. Now view your homepage. If you get a 500 error, your .htaccess is working (and you should look at the RewriteBase Nik mentioned). But if your homepage still works, then you know your .htaccess is not working. At this point, you need to tell your web host to turn it on. Or if you run the server, you need to add "AllowOveride All" to your httpd.conf for the account.
 

Try this

1. find the line "# RewriteBase /"
2. delete the "#"
3. Important: put in the whole URL of your processwire-folder without the "http://"

From Nik

Did you try this in your .htaccess already?
RewriteBase /processwire-folder/
And then try http://mywebsite.com/processwire/

That would be the url if you didn't change it during the install.
 

  • Like 7
Link to comment
Share on other sites

  • 3 months later...

Had the same problem, and it turned out to be a classic: On Ubuntu, the default Apache configuration has turned off the "AllowOverride" setting for /var/www, so I had to edit my /etc/apache2/sites-enabled/000-default file like this (the changed part in bold text):

From:

    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None 
        Order allow,deny
        allow from all
    </Directory>
 
To:
 
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All 
        Order allow,deny
        allow from all
    </Directory>

... and then restart apache with:

sudo service apache2 restart

(Didn't even need to change the RewriteBase setting in my .htaccess file, although I have a subfolder named "procwire")


Hope this helps!

  • Like 4
Link to comment
Share on other sites

Thanks for mentioning that saml. I've had to do the same thing a few times with clients that were running their own server. This is not something you'll encounter in a professional hosting environment, but when running your own server or dealing with a client running their own server, the AllowOverride setting is something you are likely to come across.

Link to comment
Share on other sites

  • 1 month later...

Doesn't work on a Mac for me. Testing separate sites in /Library/WebServer/Documents/site1.org and /Library/WebServer/Documents/site2.net

etc/apache2.httpd.conf is set to

DocumentRoot "/Library/WebServer/Documents"
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

The .htaccess 'garble' test failed, so I presume httpd.conf is the culprit but how/why?

In .htaccess I uncommented

RewriteBase /site1.org/

RewriteBase /site2.net/

Still getting a 404 error....

Link to comment
Share on other sites

Doesn't work on a Mac for me. Testing separate sites in /Library/WebServer/Documents/site1.org and /Library/WebServer/Documents/site2.net

etc/apache2.httpd.conf is set to

DocumentRoot "/Library/WebServer/Documents"

<Directory />

    Options FollowSymLinks

    AllowOverride All

    Order deny,allow

    Deny from all

</Directory>

The .htaccess 'garble' test failed, so I presume httpd.conf is the culprit but how/why?

In .htaccess I uncommented

RewriteBase /site1.org/

RewriteBase /site2.net/

Still getting a 404 error....

I dont use Mac, but you can make VirtualHosts in apache and dont need to RewriteBase.

Simple uncomment line Include /private/etc/apache2/extra/httpd-vhosts.conf  in

/etc/apache2/httpd.conf

And make new configuration for your VirtualHost in /private/etc/apache2/extra/httpd-vhosts.conf

<VirtualHost *:80>    DocumentRoot "/Library/WebServer/Documents"</VirtualHost><VirtualHost *:80>        DocumentRoot "/Library/WebServer/Documents/myweb"        ServerName myweb.local        ErrorLog "/private/var/log/apache2/myweb.local-error_log"        CustomLog "/private/var/log/apache2/myweb.local-access_log" common        <Directory "/Library/WebServer/Documents/myweb">                AllowOverride All                Order allow,deny                Allow from all        </Directory></VirtualHost>

Dont forgot restart apache and add to /etc/hosts

127.0.0.1       myweb.local



			
		
  • Like 2
Link to comment
Share on other sites

Adrian, because that's what it originally said and setting it to 'Allow from all' doesn't change anything.

Radek, 'myweb.local' goes looking for 'www.myweb.local' and ends up nowhere whereas 'mycomputername.local' goes to my local sites. But nevertheless still resulting in a 404 error.

Link to comment
Share on other sites

Adrian, because that's what it originally said and setting it to 'Allow from all' doesn't change anything.

Radek, 'myweb.local' goes looking for 'www.myweb.local' and ends up nowhere whereas 'mycomputername.local' goes to my local sites. But nevertheless still resulting in a 404 error.

Last example was accessible thrue http://myweb.local for http://www.myweb.local you can add ServerAlias.

<VirtualHost *:80>        DocumentRoot "/Library/WebServer/Documents/myweb"        ServerName myweb.local        ServerAlias www.myweb.local......
  • Like 1
Link to comment
Share on other sites

Radek, nope, same problem. And as I said I can access the site at 'mycomputername.local' but still resulting in a 404 error when I want to log in or go to 'about' or any other page.

Have you uncomented line in httpd.conf?

LoadModule rewrite_module modules/mod_rewrite.so

On some systems may be changed .htaccess name thrue.acl. I dont think this is it, but you can check.

In most cases this is about enabling AllowOverride All or editing RewriteBase. Looks like i am out of ideas now (maybe some typo in configs).

Link to comment
Share on other sites

@Radek: on windows one can check if virtualhosts are configured right with calling httpd.exe -S directly, (not restarting the service). This gives a screen like:

VirtualHost configuration:
10.10.30.50:80         is a NameVirtualHost
         default server kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:49)
         port 80 namevhost kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:49)
         port 80 namevhost pw1.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:70)
         port 80 namevhost pw2.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:87)
         port 80 namevhost pw3.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:104)
         port 80 namevhost pw4.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:189)
         port 80 namevhost pw5.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:206)
         port 80 namevhost pw6.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:223)
         port 80 namevhost pw7.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:240)
         port 80 namevhost pw8.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:257)
         port 80 namevhost pw9.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:274)
Syntax OK

Maybe it helps troubleshooting to go step by step. Also @BFD: have you updated your hosts file??

  • Like 2
Link to comment
Share on other sites

Radek, line 'LoadModule rewrite_module modules/mod_rewrite.so' is uncommented.

Horst, hosts file is updated. Restarted Apache, restarted Mac several times.

Other local sites work, including php and mysql. ProcessWire tables in database exists etc, so everything seems in order and yet....

Link to comment
Share on other sites

  • 4 weeks later...

Hi guys, 

I just bumped into the same problem, only I'm running PW on Windows (host: localhost) through nginx.

I can access the page but cannot access the admin section or any other subroute, there I get 404 error page of nginx.

I gues it's a problem of my nginx.conf file.

Here's what I have in nginx.conf:

http {
    include       mime.types;
    default_type  application/octet-stream;
 
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
 
    #access_log  logs/access.log  main;
 
    sendfile        on;
    #tcp_nopush     on;
 
    #keepalive_timeout  0;
    keepalive_timeout  65;
 
    #gzip  on;
 
    server {
        listen         80;
        server_name    localhost;
        root           c:/htdocs;
        index          index.php index.html index.htm;
        client_max_body_size    50M;
 
        location ~ /\.ht {
            deny           all;
            log_not_found  off;
            access_log     off;
        }
 
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
 
        location ~ \.php$ {
            try_files $uri =404;
            #fastcgi_split_path_info ^(.+\.php)(.*)$;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SERVER_NAME $http_host;
            fastcgi_param  PATH_INFO         $fastcgi_path_info;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_ignore_client_abort  on;
            include        fastcgi_params;
        }
    }
}

I have the docroot in C:\htdocs and there are folders for different projects using different technologies. Another CMS is running smoothly including subroutes.

Thanks a lot for any suggestion or solution. Luke

Link to comment
Share on other sites

Hi Adrian,

thanx a lot for your suggestions and sorry for the delay, I had to focus on other stuff recently.

I went through the posts and those that are included in them and basically tried to google all info about this issue.

Unfortunatelly I wasn't able to solve it. It's probably due to my insufficient knowledge of how nginx works.

But as I wrote, with another CMS (MODX), it works fine, all routes and subroutes are accessible.

One hint for those testing on Windows, localhost, I created a bat files to start/stop MySQL, nginx and PHP (sth. like start-server.bat and stop-server.bat) and they HAVE TO BE placed in the same dir as nginx.exe, as someone suggested somewhere, to avoid error messages and enable running nginx properly, just remember this.

If anyone bumped into the same problem, that subroutes are not accessible, and found a solution, a suggestion would be appreciated.

Thanx a lot again. Luke

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...