Jump to content

Homepage gets downloaded, but rest of the site works fine (solved)


MSP01
 Share

Recommended Posts

Solution:
Just added one folder between root and the site and it started to work. Probably could have fixed through .htaccess as well, but what ever works.

--

I just did a local copy of a Processwire site and I run it on XAMP on windows.

Admin and rest of the site work just fine, but whenever I try to go on homepage, the browser downloads the index.php at the root of PW instead of running it as PHP.

Been trying to google about it, but after a day of poking around it I haven't been able to figure it out.

PW version is 3.0.210, PHP is 8.2.4 running on XAMP.

Link to comment
Share on other sites

  • MSP01 changed the title to Homepage gets downloaded, but rest of the site works fine (solved)

Hello,

Probably a mistake when configuring host.

  • Edit C:\Windows\System32\drivers\etc\hosts and add line:
    127.0.0.1 my-project.local.fr
  • Edit xampp\apache\conf\extra\httpd-vhosts.conf and add:
    <VirtualHost *:80>
    		# Directory that contains index.php
            DocumentRoot "E:\src-processwire"
            ServerName my-project.local.fr
            
            <Directory "E:\src-processwire">
                Options FollowSymLinks Indexes
                Order allow,deny
                Allow from all
                AllowOverride All
                Require all granted
            </Directory>
    </VirtualHost>

Restart XAMPP Apache server and go to http://my-project.local.fr/

  • Like 2
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...