Jump to content

404 URL not found after installation.


Speed
 Share

Recommended Posts

Hi Everyone, New here but not new to CMS and Template developing :) . Early today, I've installed PW, it was successful, the result was flawless. But then, I realized I've encounter 404 error and was unable to go into admin. I've spend 4 hours going through troubleshooting guide following this link  http://processwire.com/docs/tutorials/troubleshooting-guide/page3  and I am not getting any luck, so I was hoping I could get some help from you so I can get started with PW :)

First, the PW is running on localhost using MAMP 3.3.2 (free version).  The PW files is located inside MAMP/htdocs as subfolder called pwNew. So obvious inside htaccess the  Rewrite Base command should be 

RewriteBase /pwNew

(of course hashtags has been removed) if I did it right, then it didn't work for me!  So next, I went inside  /apache/conf/httpd.conf and  then changed... 'none' to 'All' 

 

<Directory />
    Options FollowSymLinks ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

Unfortunately, it didn't work for me.  I've confirmed twice... the mod_rewrite have been installed, up and running.

Confirmation # 1 running mod_rewrite_test.php with this code below, 

<?php
if(in_array('mod_rewrite', apache_get_modules())) {
  echo 'mod_rewrite is installed.';
} else {
  echo 'mod_rewrite isn't installed.';
}
?>

...and then run it from browser

brower_mod_rewrite.JPG

Confirmation # 2 from phpinfo

apache-mod_rewrite.JPG

I really need your help and hope there are solution for it.

 

Thanks in advance. 

Link to comment
Share on other sites

Hi Speed, welcome to the PW forums :)

I don't have a direct solution to your problem, more a general recommendation based on my experience. I find the development process and (especially) the rollout to a  production environment a lot easier if I develop using a virtual host. That way you're not having to worry about subfolders and localhost and all that; you can access your development site directly at http://my-project/

Here is an article about setting up virtual hosts in the free version of MAMP:
http://foundationphp.com/tutorials/vhosts_mamp.php

Link to comment
Share on other sites

@Speed: you did restart the webserver after changing http.conf, right? I don't know MAMP in particular, but check if there's an "AccessFileName" directive somewhere in the Apache config. It may be looking for htaccess or htaccess.txt instead of .htaccess on Windows since the latter can only be created in a CMD window (I've encountered some Apache bundles over the years that did so).

Link to comment
Share on other sites

Robin S, BitPoet, and Szabesz, thank you for responding.  Although Virtual host worked!  I've followed this clear and precise tutorial https://www.taniarascia.com/setting-up-virtual-hosts/ . Test confirmed when I added index.php alone and typed <?php "Hello World" ?>

 

However, new problem arises. After copy/paste PW files into local hoses... Typed "mylocal:8888" on address bar. I end up with "index of/" page. The PW did not initiate installation.  I've tried add "mylocal:8888 index.php" and "mylocal:8888 \index.php" I end up divert to google search.  I've restarted MAMP server nothing happens.  How can I get PW to initiate installation? 

Here's some information. 

processwire's  directory C:\MAMP\processwire

httpd.conf

<VirtualHost *:8888>
  ServerName mylocal
  DocumentRoot "C:/MAMP/processwire"
</VirtualHost>

host

127.0.0.1  mylocal

 

Link to comment
Share on other sites

Oh I feel stupid :(,

From httpd.config The processwire document root is set at C:\MAMP\processwire

 MAMP server Preference > (Tab) WebServer the document root is set  \MAMP\htdoc.  

I have changed it into C:\MAMP\processwire and it initiate install.php

  • Like 1
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...