php - How to deploy laravel Application so that url doesn't contain '/public/index' -


I have a larval application in which a public file contains an index file that I can get by using the following url :

myIpAddress / teamsync / public / index

But I want to use the url like this:

MyIpAddress / teamsync to access my index file.

Perhaps the best way to remove / public / is. . Setting up your virtual host configuration file to set the / public directory as the root document. It kills a stone with a bird, so you can set yoursitename.com as the root of Laravel, but you can take sensitive back-end files away from the www root folder Are there.

  & lt; VirtualHost *: 80 & gt; Servername MySaer Document Corrections / var / www / yourproject / public server alias www.example.com & lt; / VirtualHost & gt;   

How to use virtual hosts:

  • With Apache:
  • with NGX:

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -