0

I am having an issue with getting Laravel to work properly with Apache2. This is my config file, but whenever it go to my domain I see directory list, and I need to enter to portfolio/public to see the app. That's also what the url become (my-website.com/portfolio/public/). Is there any way I can fix this? I've been trying to deploy this app for 3 days and still had no success...

Great Thanks!

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName  my-domain.com
    ServerAlias www.my-domain.com
    DocumentRoot /var/www/html/portfolio/public

<Directory /var/www/html/portfolio/public>
    AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<Directory /var/www/html/portfolio/public>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin>
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>
Amarnasan
  • 14,939
  • 5
  • 33
  • 37
Andrew Pomorski
  • 121
  • 2
  • 10
  • 1
    Your title and question conflicts. In Your **title** you told about **nginx** configuration and in question you are asking for **apache** configuration – B. Desai Jun 23 '17 at 05:23

1 Answers1

0

This might help you

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /public/index.php/$1 [L]

Source

Saurav
  • 355
  • 1
  • 3
  • 13