skip to Main Content

I am trying to deploy a Laravel 9 site onto an IIS Server (and no, I don’t have the option of using a Linux server). If I run the local server setup with "php artisan serve", it works fine through 127.0.0.1 on the server, including all calls to the database.

However, if I try to run the site through the IIS server via its domain name, I get a 500 server error. Failed Response Tracing shows a FASTCGI_UNKNOWN_ERROR: "The directory name is invalid. (0x8007010b)"

Error Screenshot

The DNS is functioning properly as I have tested a phpinfo page on it.

Is there a configuration in IIS I need to set in order for the Laravel site to work?

2

Answers


  1. Chosen as BEST ANSWER

    It turned out I didn't have my php-cgi.exe file mapped accurately in IIS. I had to edit my Handler Mappings and link the FastCgiModule handler to my current installment of PHP, mapping it to the php-cgi.exe file.


  2. The problem is not clear, but try to point IIS directly to public folder of Laravel, like this:

    enter image description here

    Hope this helps!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search