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

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -