Reputation: 3
Basically I want to use my app engine PHP project on my website. It works when I put one file in my main folder but I want to use subdirectories on my website. For example, if I want a forums I would make the url https://example.com/forums/whatever.php. Instead, I make subdirectories inside my main folder and when I access the directory listed above, it just gives me a 404 not found (nginx) error.
Here is my app.yaml file:
runtime: php55
api_version: 1
handlers:
- url: /index
static_dir: index
- url: /static
static_dir: static
- url: /index/.*
script: home.php
Upvotes: 0
Views: 1164
Reputation: 39834
The reason for the 404 is that you don't have an app.yaml
handler with a pattern matching the /forums/whatever.php
path. You need to add one.
I'd recommend changing the one you have now for the home.php
script with the generic pattern covering any php script path from the app.yaml
Example:
# Serve php scripts. - url: /(.+\.php)$ script: \1
If you also want to have a default handler for an empty path you need to add it separately:
- url: /
script: index.php
Upvotes: 2