GISKeeda
GISKeeda

Reputation: 41

Laravel showing index.php

Server Details: windows server 2012 R2 Apache server 2.4 As IIS server works 8080 and Apache works on 8181 port PHP 7.4 Mysql Database

We need to deploy the Laravel project on 8181 port.

We have run the composer successfully. After that save the Laravel project on htdocs of Apache24 folder. In htdocs we created Laravel folder into that we keep all the Laravel project file. so the path is c:/Apache24/htdocs/Laravel/public/index.php

In url it also shows the path like http://ip address:8181/Laravel/public/index.php. It shows the landing page of website. After that when click on register page it shows the register controller name after index.php like below

http://ip address:8181/Laravel/Laravel/public/index.php/register

This shows the extension of file as well as public folder, which is not standard Laravel pratice

Upvotes: 2

Views: 9703

Answers (2)

A.A Noman
A.A Noman

Reputation: 5270

You have to change some configuration

In your public directory all files cut and copy at your Laravel folder. And you have to change some configuration in your index.php file

require __DIR__.'/vendor/autoload.php';

and

$app = require_once __DIR__.'/bootstrap/app.php';

And just url like this

http://ip address/Laravel/

Upvotes: 0

Ahmad_kh
Ahmad_kh

Reputation: 181

You have to use artisan command in terminal or cmd for running laravel project.

php artisan serve 

when use this artisan command, laravel runs on port 8000 as default but if you want run project on custom port, you can use port flag in artisan commad

php artisan serve --port=8181 

Upvotes: 2

Related Questions