Comments (6)
Completely untested, but you could try:
# make sure that your dns has a cname set for sourcegraph and that your sourcegraph container is not using a base url
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name sourcegraph.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /login;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_sourcegraph sourcegraph;
proxy_pass http://$upstream_sourcegraph:7080;
}
}
from reverse-proxy-confs.
@nemchik Thanks for the help
That looks like what I had tried as well, only I also included some extra code for it's 'management console' port as well, still no luck getting it working. Here's all of the code I have so far. Note that I also included the server code for my main domain as well (in the default
file in site-confs
).
Code in default
site-confs
:
##
# Main server
# main.domain.rocks:3333
##
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
root /config/www;
index index.php index.html index.htm;
server_name main.domain.rocks;
include /config/nginx/proxy-confs/*.subfolder.conf;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
##
# Sourcegraph server
# sourcegraph.domain.rocks:3333
##
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /config/www;
index index.php index.html index.htm;
server_name sourcegraph.domain.rocks;
include /config/nginx/proxy-confs/*.subfolder.conf;
include /config/nginx/ssl.conf;
client_max_body_size 0;
}
Code in sourcegraph.subdomain.rocks
:
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name sourcegraph.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_sourcegraph sourcegraph;
proxy_pass http://$upstream_sourcegraph:7080;
}
# This allows access to the management console
location ~ (/sourcegraph)?/mc {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_sourcegraph sourcegraph;
proxy_pass http://$upstream_sourcegraph:2633;
}
}
Container name is sourcegraph
. When I navigate to: https://sourcegraph.domain.rocks:3333
it redirects me to https://main.domain.rocks:3333
.
from reverse-proxy-confs.
What are you doing with the port 3333?
Anyway you shouldn't need to put that stuff in the default site conf. generally speaking that file should be left alone and use what comes out of the box unless you know what you're doing.
As for the proxy conf it should be named sourcegraph.subfolder.conf
and placed in the proxy conf folder. I am not familiar with how the management console works but it looks like you have it set to use a different port. Depending on how it handles subfolders/baseurl/prefix paths you may need a bit more work to get it going.
from reverse-proxy-confs.
@nemchik I use port 3333 so I can add that port to my router and have all traffic on that port go to a specific computer within my LAN. It seems to work fine. I've been doing that for years, and also have it working fine for ~16 containers so far.
Ok, I'll remove the config from the default site conf and just add the config to the proxy. I was under the impression that all subdomains needed their own server
block in the default conf.
I have a sourcegraph.subdomain.conf
in that folder (with that code above) because all of the sample proxy confs have either a *.subdomain.conf, and a *.subfolder.conf, and since this site in particular is a subdomain, I saved it as such; that's not correct?
Re: the different ports; sourcegraph, for whatever reason they chose, has the main "stuff" at one port, and the "management stuff" on a different port, with it's own uniquely generated, one time pw. I've never really had a chance yet to use it so I'm not sure why they chose that route rather than just include the management stuff in it's own area on the main port.
btw, the reason I'm using it as it's own subdomain rather than subfolder is because (and I found this out after quite a bit of hair loss) is that this app in particular will only work as a subdomain.
from reverse-proxy-confs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from reverse-proxy-confs.
This issue is locked due to inactivity
from reverse-proxy-confs.
Related Issues (20)
- [BUG] Cannot acces to the admin UI via proxy HOT 5
- [BUG] Synology config not passing Secure SignIn app data HOT 2
- [FEAT] Add support for ansible Semaphore HOT 1
- [FEAT] [FEAT] include /config/nginx/custom-confs/*.conf HOT 5
- [BUG] swag auto proxy replacing all server_name entries on openvscode-server.subdomain.conf HOT 4
- [BUG] komga, remove /api block HOT 4
- [BUG] Mealie default port misconfigured
- [BUG] Vaultwarden reverse proxy change HOT 4
- [BUG] Jellyfin gives an error 27 on specific devices HOT 10
- [FEAT] amp by cubecoders HOT 3
- [BUG] calibreweb conf references wrong container name, causing error 502 HOT 2
- [FEAT] Add support for flaresolvrr HOT 2
- [FEAT] Add support for wiki.js HOT 1
- [FEAT] upstream_proto https to http HOT 3
- [FEAT] Disable nginx proxy_buffering on emby and jellyfin confs HOT 2
- [FEAT] Disable external authorization for Influxdb API endpoint HOT 4
- [FEAT] Add support for GLPI HOT 6
- [FEAT] Add support for Gatus HOT 2
- [FEAT] Add support for homepage HOT 2
- [FEAT] Add support for Nightscout HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reverse-proxy-confs.