Read this ^
Only to be completed once the customer has set up a subdomain of search.domain.com
Step 1 - Create new account
Log into Forge: https://forge.laravel.com/servers
Navigate to the AI-GENTLE-SUMMIT server which is where all SearchProps are hosted currently: https://forge.laravel.com/servers/145587#/websites
Complete the New Site form at the top of the page to create the new account on the server:
input the Root Domain
leave Alisases blank
leave Project Type as General PHP / Laravel
delete the text in Web Directory
tick Use Website Isolation
click Add Site
You should now be taken into the new account you’ve just created
Step 2 - Add SSL
This is where you set the server for this account to secure (meaning it will sit on https:// rather than http://)
From within the new account
click SSL in the left hand navigation
click the LetsEncrypt box
click the green Obtain Certification button - you may need to wait a few moments
Once it’s done, you need to make an edit to complete the SSL setup
At the bottom of the page, click Files > Edit Nginx Configuration
Scroll down to line 30 and you should see the following 3 lines of code:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Edit these 3 rows by adding a hash symbol at the start of each row, like this:
#
location / {
#try_files $uri $uri/ /index.php?$query_string;
#}
Directly above those 3 rows, paste the following new 3 lines of code, editing the domain name shown to be the relevant SearchProp domain for this customer (this should be the same as the preview link you sent the customer originally):
location /
{
proxy_pass https://DOMAIN.search-prop.com/;
}
Lines 30 - 36 should now look like this:
Click Save
All done!
Nginx Settings:
Find a property Search Prop redirect
Add under charset utf8:
|
Create a domain alias in Forge
Create actual domain first and upload git repo
Create a domain alias - don't add a new repo, leave it blank.
Edit the nginx file and look for (currently on line 8):
|
Update this to root to your real domain
|
Htaccess Settings:
|
*note: DO NOT set the URL above as https, but DO set it as httpS in the admin area of search prop
If two search props use this htaccess and put in the root
|
.htacess file
|
CORS Issues
|
NOTES
For the redirect to work you cannot have a real folder in place that the re-write is trying to act on
"find-a-property folder was taking priority. Moving it out the way fixed the issue"
Microsoft Server (IIS) Settings:
Reverse Proxy with URL Rewrite v2 and Application Request Routing:
1: Enabling Reverse Proxy functionality
- https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing#configuring-rules-for-the-reverse-proxy
2. Create the rewrite rule.
Below is an example rule set for loading a search-prop onto the url: http://example.com/property-search
|
3. Check routing is working
Once 1 & 2 are complete, you should be able to go to: http://example.com/property-search and they will see the property search.
4. Important! Link rewrites
You'll notice that clicking links on http://example.com/property-search will take you to the http://example.search-prop.com website.
To overcome this issue please let your contact at Kato know that you are ready to have the links set to the live domain. We will then toggle these so links keep the end-user on the http://example.com/property-search website.