Deploy laravel system at gear host


#1

Hi !!!

I want to deploy a system based on framework laravel, but i dont know how to in a gearhost cloudsite.

do you know how to?

thanks a lot!


#2

Click Cloudsites on the left sidebar
Click the name of your cloudsite
Click Config
Scroll down and set the virtual directory to your public folder.
The left field should say: /
Right field should say: site\wwwroot\laravel\public

“laravel” above will be the name of your folder

You will need a web.config file in your public folder with the contents like this:

<?xml version="1.0" encoding="utf-8"?>
		<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
	</staticContent>
	<httpProtocol>
		<customHeaders>
			<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains" />
			<add name="Access-Control-Allow-Origin" value="*" />
			<add name="Access-Control-Allow-Headers" value="X-Requested-With,Content-Type" />
			<add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS,DELETE,PUT,PATCH" />
            
            <remove name="Server" />
            <remove name="X-Powered-By" />
            <remove name="X-Aspnet-Version" />                
		</customHeaders>
	</httpProtocol>
	<rewrite>
		<rules>
			<rule name="Laravel5" stopProcessing="true">
				<match url="^" ignoreCase="false" />
				<conditions logicalGrouping="MatchAll">
					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
				</conditions>
				<action type="Rewrite" url="index.php" appendQueryString="true" />
			</rule>
		</rules>
	</rewrite>
</system.webServer>