我的堆栈看起来像这个nginx -> thin -> rails。在我的rails应用程序中,我的applicaton_controller.rb中有:
if (!Rails.env.development?)
before_filter :force_ssl
end
# Force logged in users to use SSL
def force_ssl
if current_user && request.protocol != "https://"
redirect_to :protocol
Dockerfile Docker运行命令:docker run -itd -p 8080:80 prod FROM node:16-alpine as builder
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
COPY . /app/
RUN npm install --silent
RUN npm install react-scripts@4.0.3 -g --silent
RUN npm run build
# production environment
FROM nginx:1.21.1-alpine
所以,我刚刚在我的服务器上安装了gitlab。我在端口256上运行捆绑的nginx,并使用let's ecnrypt设置了https。还有一个小问题,你可以通过一个普通的http地址访问它,这会抛出一个nginx错误,因为我的外部地址是https://example.com:256。所以我设置了redirect_http_to_https setting,现在所有的请求都超时了…有什么想法吗?
我的gitlab.rb配置:
## Url on which GitLab will be reachable.
## For more details on configuring exter