To force Gitea to use HTTPS I had to use Google as such an item I did not see in the documentation, it can be there and you will tell me where it is, and so I think it needs to be created
Hi @Mauladen,
This feature was added in #3262, the two config options you'll need are REDIRECT_OTHER_PORT and PORT_TO_REDIRECT. You can read more about the options here: https://docs.gitea.io/en-us/config-cheat-sheet/
I'll leave this issue open for the next bit of time in case you need any additional help.
Thanks,
@techknowlogick
@techknowlogick
https://github.com/go-gitea/gitea/issues/968
https://github.com/gogs/gogs/issues/235
I made as here
Ah I'm sorry I mis-understood the question. I thought you already had HTTPS and were trying to have the redirect happen.
If you want Gitea to run HTTPS without a reverse proxy (nginx, apache, caddy, etc..), you will need a certificate, and a private key. Gitea can generate self-signed versions of these files with a command line call gitea cert -host=git.example.com, this will output to cert.pem and key.pem in the current directory and will overwrite any existing files.
Next in your configuration you'll need to add a path to the files in your configuration
[server]
PROTOCOL=https
ROOT_URL = `https://git.example.com:3000/`
HTTP_PORT = 3000
CERT_FILE = path/to/cert.pem
KEY_FILE = path/to/key.pem
Yes, I did, but that's not the point, you need to add it to the documentation
@Mauladen feel free to submit PR for docs, we really need help on that
I had the same question, have not tried again yet though
so seems like running gitea cert --host [HOST] instead of openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out cert.pem is the key to get this working ?
Most helpful comment
Ah I'm sorry I mis-understood the question. I thought you already had HTTPS and were trying to have the redirect happen.
If you want Gitea to run HTTPS without a reverse proxy (nginx, apache, caddy, etc..), you will need a certificate, and a private key. Gitea can generate self-signed versions of these files with a command line call
gitea cert -host=git.example.com, this will output to cert.pem and key.pem in the current directory and will overwrite any existing files.Next in your configuration you'll need to add a path to the files in your configuration