If you're not going to answer any more of my questions. At least answer this one: How can I force all HTTP requests to use HTTPS?
I've just started reading about mod_rewrite, but find it confusing as fuck. Not sure where the file is located which I'm supposed to edit.
Your comment got lost on the influx of comments I got. I'm sorry for the late reply. Please, do yourself a favor and read a lot before attempting anything. It is clear that you are a newbie, and you have zero experience in this. Or, hire someone who knows what they are doing. There's nothing bad being a newbie, but if a problem arises you may not be able to solve it, so train yourself first.
As I've already told you, you need a cname from your domain to your dynamic dns hostname. It can't get more clear than this. That means that if your domain has an A record, you have to remove it. Also, you can't have a CName for
domain.com
. A CName can exist only for subdomains (such aswww.domain.com
orwhateverhere.domain.com
), so you can't have a full domain point to your dynamic IP.For databases, there is no file structure. You connect to the Database via programming commands (and TCP connections that are made automatically with the commands you'll implement on your code).
If you are going to
https://domain.com/
, your server is already using SSL certificates. If you get dropped onhttp://domain.com
(i.e. non-secure url) there is a direct link, or misconfiguration on your website.However, here is a snippet to autoredirect all HTTP to HTTPS
Near
</VirtualHost>
in your vhost file.Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
It's all good.
I am indeed a newbie. I already told you that this is the very first server I've ever set up. This is precisely how I am learning. Learning by reading and doing.
A lot of our conversation has seemingly gotten lost in translation or something.
Yes, I already tried removing my A record and leaving only the CNAME, which points to the DDNS subdomain (i.e. mine.ddns.net), but this didn't work.
When you say I can't have a full domain point to my dynamic IP, do you mean (1) the CNAME will only work with www.mydomain.com and won't work with mydomain.com or that (2) the website to which the CNAME points must be a subdomain (i.e. mine.ddns.net)??
What I'd like to do is allow my users to use mydomain.com, but when users try to access the server via mydomain.com their browsers automatically assume the HTTP protocol. In other words, when users type in https://mydomain.com it works, but when they just type mydomain.com it doesn't work. I know this is because I chose to deny HTTP requests when I was setting up the server/SSL certificate. I don't want my users to have to type https:// every single time they wish to visit my website.
I know I can achieve this via the vhost redirect, correct? I'm not sure where the vhost file is located, however. But I haven't had a chance yet to do any extensive research regarding this.
Yes, I figured out the the database thing on my own. I asked that question before messing around with anything. I thought I might've needed to explicitly point to the database's actual location on the server in order for the code to interact with the database.
Also, I have already come across many similar snippets, but, again, I'm just not sure which file I'm supposed to be editing :/
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit