linuxserver / docker-nginx

GNU General Public License v3.0
142 stars 43 forks source link

[BUG] https support #101

Closed wp-coin closed 1 month ago

wp-coin commented 4 months ago

Is there an existing issue for this?

Current Behavior

the server does not work well with https enabled, I get an error in the browser ( too many redirects)

i have to add support in WordPress for it to work, but https should be on the server level

I have to add this code in php for https to work

if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
    $_SERVER['HTTPS'] = '1';
}

the way I add apps in my server is through the caprover interface

Screenshot 2024-05-06 202639

Expected Behavior

https support in the browser

Steps To Reproduce

install in docker, enable https with lets Encrypt running on a nginx server

Environment

- OS: debian 12
- How docker service was installed: followed docs https://docs.docker.com/engine/install/debian/

CPU architecture

x86-64

Docker creation

see above for screenshot

Container logs

2024-05-07T01:41:30.974150345Z [migrations] started
2024-05-07T01:41:30.982671640Z [migrations] 01-nginx-site-confs-default: executing...
2024-05-07T01:41:30.992398828Z [migrations] 01-nginx-site-confs-default: succeeded
2024-05-07T01:41:30.992427040Z [migrations] done
2024-05-07T01:41:31.021076463Z usermod: no changes
2024-05-07T01:41:31.023192409Z ───────────────────────────────────────
2024-05-07T01:41:31.023224830Z _____ __ __ _____ _____ _____ _____
2024-05-07T01:41:31.023229379Z | | | | __|_ _| | |
2024-05-07T01:41:31.023232945Z | --| | |__ | | | | | | | | |
2024-05-07T01:41:31.023236691Z |_____|_____|_____| |_| |_____|_|_|_|
2024-05-07T01:41:31.023240479Z _____ __ __ _ __ ____
2024-05-07T01:41:31.023244085Z | __ | | | | | | \
2024-05-07T01:41:31.023247572Z | __ -| | | | |__| | |
2024-05-07T01:41:31.023251289Z |_____|_____|_|_____|____/
2024-05-07T01:41:31.023254825Z
2024-05-07T01:41:31.023258222Z Based on images from linuxserver.io
2024-05-07T01:41:31.023261779Z ───────────────────────────────────────
2024-05-07T01:41:31.023526992Z
2024-05-07T01:41:31.023540537Z To support LSIO projects visit:
2024-05-07T01:41:31.023548702Z https://www.linuxserver.io/donate/
2024-05-07T01:41:31.023553231Z
2024-05-07T01:41:31.023556828Z ───────────────────────────────────────
2024-05-07T01:41:31.023561126Z GID/UID
2024-05-07T01:41:31.023569722Z ───────────────────────────────────────
2024-05-07T01:41:31.027895600Z
2024-05-07T01:41:31.027926617Z User UID: 911
2024-05-07T01:41:31.027931046Z User GID: 911
2024-05-07T01:41:31.027934171Z ───────────────────────────────────────
2024-05-07T01:41:31.027938670Z
2024-05-07T01:41:31.109377950Z Setting resolver to 127.0.0.11
2024-05-07T01:41:31.114067455Z Setting worker_processes to 6
2024-05-07T01:41:31.135893002Z generating self-signed keys in /config/keys, you can replace these with your own keys if required
2024-05-07T01:41:31.171849109Z .+++++++++++++++++++++++++++++++++++++++*...+........+...+...+.+...+........+...+....+........+.......+..+.+.........+.....+++++++++++++++++++++++++++++++++++++++*...+.........+...+.+..+.......+......+.........+......+.....+.+.....+...+.+..............+.......+........+...+...+..........+..+...+....+...+.................+......+.+.........+............+...............+..+......+....+..+.+....................+...+............+....+...++++++
2024-05-07T01:41:31.214716565Z ...+...+.............+......+.....+................+........+.+.....+.+........+.......+.....+............+.+.....+....+......+++++++++++++++++++++++++++++++++++++++*..+..........+........+.+.....+.+..+.............+..+...+....+.........+.................+....+++++++++++++++++++++++++++++++++++++++*.........+........+.......+.....+...+......+.+...+.........+......+.........+...+..+.+..............+......+.+.....+.+...+...........+...+...+...+.+.....+......+..........+............+........+...+....+.....+..........+.....+.......+.........+..+....+...+.....+...+...+..........+.........+...+..+.+..+....+.....+.............+...+........+..........+.....+.+.....+......+.........+.+............+......+..+...+................+...+......+.....+.+..................+..+....+.....+.+........+.+..+...............+....+.........+...........+...++++++
2024-05-07T01:41:31.219335880Z -----
2024-05-07T01:41:31.305954175Z [custom-init] No custom files found, skipping...
2024-05-07T01:41:31.325204662Z [ls.io-init] done.
github-actions[bot] commented 4 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

LinuxServer-CI commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 weeks ago

This issue is locked due to inactivity