I'm trying to upload multiple Laravel 4 projects to my web server, not my development server. Each laravel 4 app is housed in their own subdirectory. How should my file structure be? I've searched around for a htaccess to remove the /public from the url but i've been unsuccessful. this server is for testing purposes only, it allows others to follow along as the project is being built. I know their are major security issues with leaving the laravel base structure in these directories, but again they are just for testing purposes and when the projects are complete they are removed and placed on their own hosting server. This is my file structure now:
-public_html/
main website html files
-Test Site Subdirectory Folder
-subdirectoryFolder
-Store/
-laravel app 1
-blog/
-laravel app 2
-newspaper
-laravel app 3
if i install laravel app in each subdirectory folder (www.testsite.com/Store
, www.testsite.com/blog
, www.testsite.com/newspaper
) each application works, however I am trying to remove the public at the end of the url, www.testsite.com/Store/public
is what is shown in the browser. Any help with this problem is greatly appreciated. Thank you.
move all content include
index.php
in each public directory to Store, Blog and Newspaper respectively. and change the following line:to
good luck.
EDIT: Sorry. You have to edit
/bootstrap/paths.php
as well, changeto
Looks like my development structure here is exactly what you're trying to do. So I have this folder structure:
This is my VirtualHost file
/var/www/Store/vhost.conf
:Yeah, I put it in my project folder and add an include in /etc/apache2/apache2.conf:
This is my .htaccess file:
And I just have to hit
or
To see it.
I've built a small script to do all that for me: https://github.com/antonioribeiro/laravel-installer. It downloads, installs, configures and boot a Laravel application in whatever folder I need to, doing whatever is necessary. Compatible with Debian based distros, like Ubuntu.
EDIT
Note that there are two things that remove the
/public
and the/index.php
from your url:1) the /Store pointing directly to your public folder:
2) and the rewriting rule to keep your url clean from the
index.php
: