我的停靠-撰写文件如下:
version: '3'
services:
database:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: qwerty
POSTGRES_USER: qwerty
backend:
depends_on:
- database
build:
#Dockerfile used here will use python image,build the django pro
我们在Docker的公共域名下有几个rails应用程序,我们使用nginx将请求定向到特定的应用程序。
our_dev_server.com/foo # proxies to foo app
our_dev_server.com/bar # proxies to bar
配置如下所示:
upstream foo {
server foo:3000;
}
upstream bar {
server bar:3000;
}
# and about 10 more...
server {
listen *:80 default_server;
server_name our_
我在生产中有一个Django应用程序,我的web服务器是Nginx。
我的应用程序位于/home/rouizi/blog,我的域名是example.com。我希望防止用户读取位于blog文件夹中的文件。
例如,使用我的实际配置,如果有人访问exemple.com/manage.py,他可以看到该文件的内容。我想给他看一个404 not found错误。
这是我的nginx配置:
/etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-e