I have been using laravel framework version 10 for in-house web application development, which will run on intranet not internet.
I downloaded and installed xampp having php version 8.1.17, i downloaded and install composer with selecting php.exe of php version 8.1.17 installed at "C:/xampp/php"
after that i have downloaded laravel 10 project using composer at path "C:/xampp/htdocs/project".
I have valid ssl certificate for my intranet domain for example abc.example.com, now at "C:/xampp/apache/extra/httpd-vhosts.conf", i have placed following code to configure ssl certificate
<VirtualHost abc.example.com:444>
DocumentRoot "C:/xampp/htdocs/project"
ServerName abc.example.com:444
SSLEngine on
SSLCertificateFile "conf/ssl.crt/22112022.cer"
SSLCertificateKeyFile "conf/ssl.crt/22112022-rsa.key"
SSLProtocol all -SSLv3
<Directory "C:/xampp/htdocs/project">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Now i am running my laravel project with command "php artisan serve --host=abc.example.com --port=444"
when i am accessing my application using url "https://abc.example.com:444/", it is showing directory listing of my project at "C:/xampp/htdocs/project", Please check image below :
My laravel project is not executing, instead directory listing is displaying, ssl is resolving as expected. can anyone guide me with this ? i am new to laravel but not xampp.
2
Answers
In my case I would recommend you to use:
Much better to focus on the development process and its ssl support already.
You will need to provide the location of the public directory in DocumentRoot at your host for your laravel application.
Ex:
DocumentRoot "C:/xampp/htdocs/project/public"
You can check the answer here