Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
Laravel 7.10 new installation not working if no index.php in url

I have installed a fresh installation of laravel and everything is working fine except that if I go to the url without entering the index.php at the end, then it doesn't work.

I am using:

http://localhost/index.php

And in this case, the page appears correctly but if I enter only:

http://localhost/

Then it is not working as expected.

How to see if it works or not, I have installed the debugbar and in the first case it is showing but in second case it is not.

I have update the apache2 config so that it starts in the public directory and also I made sure that it accepts php with DirectoryIndex index.php in the 000-default.conf.

Should I set up something so that it forces a redirect to index.php when hitting the directory in the browser?

Here is what I get from my phpinfo for the loaded modules in apache2 handler, I can see the mod_rewrite

Loaded Modules

core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_mime prefork mod_negotiation mod_php7 mod_reqtimeout mod_rewrite mod_setenvif mod_status 
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

please change the contents of httpd.conf file like as below.

<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>


...

Listen 8094
<VirtualHost *:8094>

DocumentRoot "D:\yoursouce\public"

    <Directory "D:\yoursouce\public">

        Require all granted
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
...

Then try

http://localhost:8094/

Best Regards

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!