I am using laravel forge and it's awesome. However i ran into one problem.
I created a server on digital ocean and referred my domains to that ip. Everything good and well so far.
Than i created a site. Used the deployer and yup everything worked like a charm, however now i added a second site to the server. and well yes it added the site. so /home/forge/website2.com. However now when going to my previous site: website1.com it shows me website2.com.. i rebooted the server, reloaded nginx nothing seems to work als in sites_available the paths look good.
Any idea's?
Are site 1 and site 2 on different domains, or are they just different sub domains?
Have you tried comparing the Nginx configuration (you can get to it from the Forge site) between the two websites?
To me it seems that your Nginx configuration is wrong. Lastly, are either of them stored on the "default" site on forge or did you qualify a url and keep "default" empty?
This issue has been resolved by taylor, He updated forge and this isn't a problem anymore.
Related
I searched for my issue in so many ways, but I don't seem to find the correct case, so I'm asking here.
I have a Laravel app which is installed on a server and everything works correct. The domain is set as HTTP only and is configured from AWS. However we need to have another domain which should work only from HTTPS. The HTTP domain is pointing to the server instance and the HTTPS one is pointing to a CloudFront distribution with origin the HTTP domain. The issue is that when I open the HTTPS domain, all of the links and images are loaded from the HTTP domain.
To be more concrete, let's say I have http://mysite-notsecure.example.com and https://mysite-secure.example.com.
When I open http://mysite-notsecure.example.com everything works as it should and there are no issues. However when I open https://mysite-secure.example.com the site loads, also files like app.js and app.css load with the correct host, but things like fonts, images, links, etc, load from http://mysite-notsecure.example.com.
Because most of the urls are built with the url() function, I think the issue has something to do with APP_URL, which was first set to http://mysite-notsecure.example.com, but when I added the new domain, I set it to empty (APP_URL=),
however the urls are still built the same way (I cleared config cache).
What should I do in order for my site to build the urls according to the current host?
I don't need any other change for the two domains. They should load everything exactly the same, only the host should remain and not redirect to the other domain.
It turned out there were two different issues.
I'll describe them here, because there is a slight chance someone could be dealing with one of them.
First, I printed the contents of the $_SERVER variable on both domains and the host in both was the same - the HTTP domain.
This issue was from the CloudFront configuration. Turned out the Host header was removed from the CF distribution behavior, so that CF replaced it with the origin's value (the origin is the http domain). After this was fixed, the host in $_SERVER appeared correctly.
But the initial issue for the urls building was something else which I didn't think of. After clearing the cache to remove the debugging and seeing the right urls on the HTTPS domain, I switched back to the HTTP one and saw now there all the urls pointed to the HTTPS domain. That is when it hit me that these domains share not only the configuration, but also the cache. And most of my urls on the page I was testing with, were coming from a function with cache, so when the cache was stored from one of the domains, they appeared the same on the other. When I included the host in the cache key, everything worked correctly.
Hope this helps someone else.
goto file .env and setup the APP_URL=https://mysite-secure.example.com/ and change
href={{asset('folder-path')}} in layout or blades file
I am a student and have created my first Laravel App (A blog app). I have a layout/master view created named app.blade.php in resources/views/layouts folder.
I am using laravel 5.6.
It works perfectly on localhost but not on heroku hosting.
Here is my project structure
Here is my code in home.blade.php
Heroku hosting error screen below
Localhost view
clueless about this problem. I need your support.
EDIT
I solved the problem. I am on a windows system while hosting on a linux platform. So my sweet innocent windows was not updating the "Layouts" on server with "layouts".
But I am with another problem
Regards,
Arpan
but loading /login /register correctly
Now this doesn't end here,
when I type /login with the url it gives me
Now I observe that when i click the link it shows me Not secure connection and displays properly but when typing there is https but not displayed correctly.
Please help me analyse and figure out the issue.
Github repo link : https://github.com/ArpanKIIT2017/blog4b/
Its because the app was unable to find the file. But everything looks good. can you check if the file exists on remote server.
what are you using to push the files to remote server?.
try running
php artisan view:clear
on both local and heroku
Actually Heroku doesn't support SSL in free tier. So https actually won't work.
Finnaly migrated my app to postgre sql.
Problem mainly was due to the uppercase and lowercase representation of "Layouts".
So my app is Up and Running only with one problem that is heroku doesn't support file uploads. It is not storing any file upload. Searching solution for that but not related to this post.
Thank You
I have uploaded a Magento website to Azure website. It was working perfectly fine with websitename.azurewebsites.net
But when i tried to use a custom domain(I did the dns thing also). Whenever i go to the custom domain or with .azurewebsites.net it redirects to www.websitename.azurewebsites.net
Why is the www coming before websitename.azurewebsites.net ?
You configured your DNS with CNAME
www.websitename.azurewebsites.net
Check the guide you followed for DNS configuration and make sure "www" in the front is removed.
This is for a client so I won't share exact domains but the problem is as follows..
I took over development of a website from a prior developer.
The hosting is Hostgator Business.
The primary domain is primary.com.
There is an addon domain addon.com.
The primary domain document root is /home1/username/public_html.
The addon's document root is /home1/username/addon.com.
www.addon.com had a WordPress installation which the developer had edited instead of using plugins to achieve his goals. The site also needed a complete redesign so I felt it logical to simply wipe the installation and replace it.
So, I deleted all of the WordPress files and uploaded a new copy of WordPress from wordpress.org/latest.tar.gz
Prior to deleting the old installation, the domain loaded files from it's document root perfectly.
After uploading the new installation instead of resolving to addon.com it is instead resolving to primary.com/addon.com
I've never seen this happen before so I'm lost.
There's no errors in any available logs.
All file permissions are correct.. I've triple-checked.
I've tried deleting all files and creating simple index.php and index.html files to see if it would access them ... it doesn't.
This happens in each browser I use on Windows and Linux.
I don't understand it because all I did was swap out the old WP install for a new one.
I went and re-uploaded the old WordPress installation so everything is 100% how it was but it is still going to primary.com/addon.com instead of addon.com.
Has anyone faced this issue before? I usually use Bluehost but even when I've used Hostgator in the past I've never seen this happen.
I double-checked the addon domain settings as well as anything else I could think of and everything appears normal.
I even deleted the addon domain and re-added it with the document root of /home1/username/addon.com and it still goes to primary.com/addon.com in the browser.
I submitted a ticket with Hostgator but they have not replied yet.
I'm sorry if this is long. This is my first time asking for help on here and I wanted to be sure I included everything I could.
Hostgator finally got back to me.
The previous developer had used the one-click WordPress install.
Apparently once someone uses a one-click install the only way it works is if you keep using the one-click install/you cannot do it manually any more.
From all the servers and sites I've setup this makes no sense and is a problem with Hostgator. Support did not really tell me anything other than "you have to use the one click install since the prior developer did". Great service.
Hope this saves someone some hassle.
From this it sounds like you were moving a WordPress site from the primary domain to an add on domain.
Simply moving the files from the primary to the add on domain will not make it work on the add on domain because in the database and throughout the coding of the WordPress site it would all be configured and coded for the primary domain.
It sounds like you would need to update the site home and site url from the primary to the add on domain url.
http://support.hostgator.com/articles/specialized-help/technical/wordpress/wordpress-home-fix
Also I would be suggest using a search and replace type plugin to go through all the internal coding to update the urls and links to the add on domain.
There is more information here as well http://codex.wordpress.org/Moving_WordPress
my very first post to the forum.. Only due to the fact I've just started a new Job in development and I've spent over xmas trying to get this to work! The job requires me to carry on with JQuery & PHP with the ongoing project - but done offline(localhost) in wamp or xammp and not 'live' as you call it, its already an 8 months project so ideally this does need to be setup like this as I've just started.
I've looked everywhere, I've tried playing around plenty with the .htaccess file, config, checked database, checked routes. Everything on stack overflow.
Now, when they let me try this on my personal server (1and1) to see if it all worked when I copied there ftp files to mine - IT WORKED! But in XAMPP or WAMP it doesn't, for starters it said missing 'MY_CONTROLLER' class which I fixed, it does seem to work when I changed
How come this is working on 1and1 but not on localhost(XAMPP/WAMP) etc?
Please be aware, I have looked everywhere for a solution. All I can think is PHP versions & tweaks on the server installation? Any help would be great, I've been tempting to post for the last week!
UPDATE: I forgot to mention, I followed a tip on here regarding the .htaccess file, it got me to land on the home.php but it wasnt displaying any views, so I changed the < ? tags to < ? php and just gave me a lot of errors, before that all it was displaying its just plain HTML and no CSS with load->view-> everywhere
SOLVED - I created a virtual host and set up windows hosts with the same domain e.g 127.0.0.1, basically what Riggs said so if anyone else is having trouble see his link - and read carefully! Should of put this sooner so sorry - I'm new