xpf0000 / PhpWebStudy

Powerful Web Server and PHP Environment. Support macOS / Windows / Linux
https://www.macphpstudy.com
BSD 3-Clause "New" or "Revised" License
623 stars 53 forks source link

Nginx pretty url / rewrite isn't working on mac #48

Closed pixluser closed 1 year ago

pixluser commented 1 year ago

Hello,

// I just discovered your fantastic software, because I didn't want to use something like MAMP, or MAMP pro. // Thank you for it, it's very fast and neat!

The problem I have : Using urls like /xxxx/xxx with Nginx give me 404 Not Found. From a fresh install PhpWebStudy-1.0.46-arm64.dmg (on M1 pro)

I refreshed permalinks in wordpress too, two times. Didn't work for me.

Is there a config hack needed?

PS: Cannot use apache too, (basic version and brew version too) : got forbidden on 8080

xpf0000 commented 1 year ago

I'm glad you enjoyed this software, thanks

  1. The accessibility of a site is related to the permissions of the folder where the site is located, and both the owner user and read/write permissions of the folder will affect the accessibility of the site
  2. NGINX Rewrite Rules need to be set according to the project, depending on your project. After setting them up, you can open the site's configuration file to view and test them
pixluser commented 1 year ago

NGINX Rewrite Rules need to be set according to the project, depending on your project. After setting them up, you can open the site's configuration file to view and test them

Thank you so much for the quick feedback. I thinked that rewrite rules were automatic with your software. As I saw into the config some informations about that. They needed to be edited into the host nginx file maybe? (no modifications to do on main system conf I mean).

Thank you!

xpf0000 commented 1 year ago
  1. nginx url rewrite quick settings provided in the site editing interface, just some common project general settings, may be due to project upgrades and other reasons, may not always be completely correct.
  2. nginx url rewrite settings in the site editing interface, will be saved to a separate configuration file, in the main configuration file, will load the url rewrite file, site -> setup -> Config File -> nginx, open the site's main configuration file, there is a line, similar to. include /Users/xxx/Library/PhpWebStudy/server/vhost/rewrite/xxx.conf; This file is the site's nginx url rewrite configuration file.
  3. software will not actively modify the site's nginx url rewrite configuration, unless the user manually set in the site editing interface, or directly modify the nginx url rewrite configuration file
pixluser commented 1 year ago

Ooo ! I forgot to setup the quick settings at the bottom of the windows of the site setting in hosts. It now work directly by configuring it for wordpress.

SO cool! Long life to this merveillous project!

Thank you so much!