search

Home  >  Q&A  >  body text

Laravel configures nginx as pseudo-static

1. I added this sentence from laravel official in the nginx configuration, and it reported 500. Why? After that, it was normal
2.
location / {try_files $ uri $uri/ /index.php?$query_string;}
3. I looked at a lot of configurations, but it doesn’t work. Pseudo-static has been unsuccessful. Please give me some advice.
4、/q/1010000002797...

怪我咯怪我咯2777 days ago484

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:55:46

    To give you an idea for troubleshooting, add a sentence print_r($_SERVER);die;

    under <?php in index.php in the web root directory

    Attention, be sure to add die;

    Then visit the website. If it cannot be accessed normally, it means that the location parsed by PHP failed.

    If it can be accessed normally, check whether the pathinfo and request_path output in the browser are correct.

    reply
    0
  • Cancelreply