We just moved a bunch of our websites from one server to another (obviously changing their IP addresses in the process), some of which were multisites in magento. The domains are not parked, but the multisites work. I don't completely understand how magento works regarding multisites, but that's not necessarily what my question is.
When we moved the websites, the multisites were broken. Eventually, we hired a freelancer to fix the multisites. Last night, i put the entire website package (multisites included) on their own dedicated IP addresses. They're on the same server, in the same place, but they have their own IP address on that server. I just walked in monday morning and SSL is broken on all the multisites, but works on the main website. Can anybody tell me what to do here? I have access to the certificate, bought through a third party. When i try to list the certs in cpanel, it just lists the main website as a "controlled certificate". My question is, why did these work on the original IP address after being transferred to the new server? and how do i set up SSL on the multisites? I have cPanel but im actually an admin that's worked WITHOUT cpanel for many years (not in webhosting). so i dont know much about ssl.
Depends on what certificate you have and server config. The only thing in magento you should check is the secure url is https and that it is enabled per each site in the admin. The certificate setup depends on what type of certificate you are using. If it's a wild card/ucc certificate that covers all domains/subdomains then it should simply install the certificate and the issuing authorities certificate, setup vhosts and it should work for all sites. If it's individual certificates per website you will need to install each certificate onto the server but this can be complex.
You also need to configure the apache vhost for each site so there is a host listening on port 443 for each site. there should be an ssl directive poiting to the certificate files. Check the vhost for the working site and compare to the others to see if anything is missing. If individual certificates (i.e. one per each domain) you normally need to have multiple ips for your server, one per each domain.
This issue got complex because our server was set up using cPanel, which means it had a bunch of pre-installed programs (like, for example, sendmail, dovecot, etc.) the program that was giving me grief over this issue was suphp. I couldn't figure out how to make the multisites work independently of the parent website. so, say i have www.frattoys.com as the parent and a bunch of child sites that pull from it, like frattanks.com, irontap.com, etc. those child websites share source code with frattoys.com. suphp wasnt allowing frattanks and irontap to pull code from frattoys if they were independent websites; independent cpanel and user accounts. thats why i was trying to install SSL on top of addon or subdomains; hence the question. as it turned out, i ended up uninstalling suphp and replacing it with fastcgi. that way, i could set the permissions to what they needed to be, share the code with frattoys, and install SSL on the child websites without too many issues.
The eventual solution to my problems was to install fastcgi (uninstall suphp), create independent users for each child website, and install SSL certificates from WHM for each child user.
Related
To preface this, I am new to backend web development so I'm coming at this totally clueless. My past experience is with Netlify, which makes it pretty seamless to add a custom domain to a website with their free DNS service.
To start, I am working on a Flask application that ideally I would like to put on a subdomain of my website (i.e. app.my-website.whatever, not actually my real domain since it includes my real name) on a different host, in this case Heroku, while keeping my main website (www.my-website.whatever) on Netlify. This required me to switch from using Netlify's DNS to using the DNS tools provided by Google Domains.
After deploying the app on the free domain, which went just fine, I tried setting up my domain for the website, following these steps:
On my website's dashboard, I went to Settings > Domains > Add domain and under domain entered app.my-website.whatever, including the subdomain of course.
Copied the DNS Target Heroku gave me.
At my dashboard for my-website.whatever at domains.google.com, under DNS > Default name servers > Resource records, I added a custom record with the hostname app.my-website.whatever (Google Domains automatically adds the .my-website.whatever), type CNAME, TTL 600, and in the Data field I pasted the DNS Target.
In my Ubuntu (WSL) terminal, when I type host app.my-website.whatever, the output says app.my-website.whatever is an alias for {bunch-of-random-characters}.herokudns.com.
Unfortunately, this has not been successful. When I try to visit the domain, I usually get an error such as DNS_PROBE_FINISHED_NXDOMAIN or alternatively ERR_SSL_UNRECOGNIZED_NAME_ALERT. I've also tried the same thing with just www.my-website.whatever, and the same issues occur.
When I try to visit the site, most browsers will automatically append https://, which I would assume doesn't quite work since I do not have a cert set-up for my site, which I need to do manually.
Does the above error mean that there is a problem related to SSL, or is it something else? Is it because my browser forces https:// that I cannot see anything changing (i.e. would http:// work?)?
From what I can tell, I should be able to do all of this on the free-tire, but I have some confusion about a few details, and feel like I could be missing some other things:
Do I need a certificate/SSL for my custom domain to work at all with Heroku?
If it could possibly be an easier solution: Is there a better alternative to Heroku in my case?
With regards to setting up the cert, I tried following the tutorial here:
https://medium.com/#bantic/free-tls-with-letsencrypt-and-heroku-in-5-minutes-807361cca5d3
For certbot, as the tutorial explains, you are given two strings like so: <long-string>.<other-long-string>, and you need to serve a file at /.well-known/acme-challenge/ with the name <long-string> (no extension), but as an unrelated issue, I cannot get Flask to serve this file, even on a local dev server, and I just get a 404 message, which the certbot utility also reports. I can create another file, such as a simple .txt file, in that same directory, and it will serve just fine.
I'll admit, these issues feel a bit basic, but I genuinely am lost, and none of the guides or posts I see online seem to have any remedy or explanation for what is happening here.
If there is any more information I should share, please let me know.
I have multiple domains, and would like to point them all to the same app. I want them all to serve the same pages, but the way it's setup now, I get a 404 not found if I try to go anywhere in the app other than the home page.
I have the nginx server block setup with server maindomain.com www.maindomain.com seconddomain.com www.seconddomain.com thirddomain.com www.thirddomain.com
I also have SSL certificates setup for all the domains listed, and the test out with an A from SSL labs. Question is, how do I get them all to serve the pages in the app, and not just the main domain's homepage?
I have looked at similar questions, but they don't seem to address this exact issue. I don't want multiple domains pointing to different views (that's cool, but not what I need), and I already have a different app with a different name hosted on the same server and working correctly. I've tried forwarding in the past, but it didn't work out (SSL issues).
I have recently installed PHP, MySQL Server, and Apache web server. I played around with some PHP scripts locally on the PC to insert some entries to MySQL Database.
Noob question so please be patient with me:
How do I get my web service out to the internet, by self hosting? Say I already have a domain for example mydomain.com How do I make it so that when someone not within my network can access mydomain.com/something and can send some data so my server gets it and do anything with that data?
Webhosting
You have to have some form of webhosting. You pay for hosting and you can upload your PHP files to their servers. They will usually also have database servers you can use.
Your domain name has to point to those servers via DNS so the internet can reach your application. I'd suggest you search the internet for popular hosts that provide the tools your need for this.
Self hosting
Another possibility is to open your network up to the world, but this is not recommended unless you have network administration experience due the security trouble that comes with it.
In short: forward a port through your router to the machine running your application. The website portforward.com has instructions on how to do this but keep in mind that misconfiguration could lead to vulnerabilities in your network.
In order to make you site public
1. you need host
2. you need domain
there are bunch of hosting sites you should get one first.
This link explains very well about self hosting
https://www.boutell.com/newfaq/creating/hostmyown.html
I'm using the Flask microframework to run the Python back-end of my site with an SQLite database. It all looks fine and well running on my Ubuntu machine. But how and where can I actually host it online with a proper URL as in: "https://appname.io"?
Do web hosts usually provide Linux and SSH capabilities?
The 'proper URL' you describe is a domain name, and they can be purchased from many online retailers you'll discover when you Google it.
To host your site you will need an actual server host. Many retailers that sell domain names also sell web hosting, but not all. Essentially, every host will provide you with SSH, FTP, MYSQL and anything you may need to host your site. Linking your domain name is normally done automatically if you're purchase both your domain and hosting from the same retailer. However, if purchasing separately you will have to enter the DNS server information to resolve your host.
Try reading this article to get a good idea of how to move your project to a host. This article is for WordPress, but you should be able to get the general idea on the process.
I'd like when a user types the domain YOURSITE.com to not go into a loop and crash. I've searched for answers for a couple days now and can't seem to find the exact one.
Error from chrome: This webpage has a redirect loop - The webpage at http://YOURSITE.com/ >has resulted in too many redirects. Clearing your cookies for this site or allowing third->party cookies may fix the problem. If not, it is possibly a server configuration issue and >not a problem with your computer.
Background:
Rails 3.2.14 App with Ruby 2.0.0
Domain bought with godaddy
Hosting on Heroku with both domains setup www.YOURSITE.com and YOURSITE.com
Using AWS with route 53 and S3.
Let me know what relevant code you need to help or if this is something that is being caused by AWS or the like. I've tried an reversed several different things via my code, but can't seem to find anything that works.
you should log into your Heroku dashboard, click on the app and then click on the "Production Check" button. This will help you check for DNS issues among other.
Check your DNS Zone file with godaddy. How are you redirecting the sub domain www to the host domain?
On your rails app, how is your route.rb file handling the incoming traffic? do you have any redirection there?
Hope that helps..
There is a very good write up that goes through configuration settings between AWS, the domain registrar (in my case godaddy), and heroku here: https://devcenter.heroku.com/articles/route-53#naked-root-domain I used this originally when I set up my site.
I wish I could say I know what the problem was, but I'm not totally sure what it was. My guess is that it had to do with APEX domains being unsupported by AWS and/or Heroku, and therefore I needed not to try to redirect. Here's the settings that worked for me:
Godaddy domain mysite.com, transferred my DNS stuff to AWS (I had done that prior to the problem)
Heroku: you can either use the CL or you can access the settings for your app online. In either situation I set up my domains to be mysite.com and www.mysite.com
AWS: This is a little trickier. You need to make sure the settings for Route 53 and S3 are exactly like in the tutorial link above. Your mysite.com bucket in S3 must redirect to www.mysite.com.
This isn't ideal and there are probably ways to get around this using different companies for hosting/DNS services, but with the Heroku/AWS combo this is what I had to do to stop the redirect loop.