Hello,
I have a Ubuntu 20.04 server with OpenLiteSpeed and I need to deploy Laravel application.
I have changed document root to
The app that I need to install have two .htaccess files, one in a main project directory, and one in a public/ folder.
The code in a main directory is as following:
	
	
	
		
And the code from .htaccess in public/ folder:
	
	
	
		
The question is, did anybody know how can I convert aforementioned Apache configuration to OLWS config directives?
Last, but not least, I would like to avoid using .htaccess files and put appropriate configuration directly in virtual host config file.
Any help is appreciated.
								I have a Ubuntu 20.04 server with OpenLiteSpeed and I need to deploy Laravel application.
I have changed document root to
$VH_ROOT/public_html/public, and enabled rewrites and I also checked option Auto Load from .htaccess from WebAdmin Console, but that did not work. Everything I got is error 500.The app that I need to install have two .htaccess files, one in a main project directory, and one in a public/ folder.
The code in a main directory is as following:
		Apache config:
	
	<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
    RewriteEngine On
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]
    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.jpeg|\.gif|robots\.txt|\.ico|\.ttf|\.woff|\.woff2|\.svg)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(custom|css|assets|storage|landing|installer|js)/(.*)$ public/$1/$2 [L,NC]
</IfModule>
	And the code from .htaccess in public/ folder:
		Apache config:
	
	<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
    RewriteEngine On
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]
    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
	Last, but not least, I would like to avoid using .htaccess files and put appropriate configuration directly in virtual host config file.
Any help is appreciated.
								
									Last edited: