[已解决]apache代理django的样式问题
Tofloor
poster avatar
silkapok
deepin
2020-11-21 03:42
Author

浏览器返回



uwsgi.ini配置

[uwsgi]
#配置和nginx连接的socket连接
socket=0.0.0.0:8001
#也可以使用http
#http=0.0.0.0:8001
#配置项目路径,项目的所在目录
chdir=/home/mysite3
#配置wsgi接口模块文件路径
wsgi-file=mysite3/wsgi.py
#配置启动的进程数
processes=4
#配置每个进程的线程数
threads=2
#配置启动管理主进程
master=True
#配置存放主进程的进程号文件
pidfile=uwsgi.pid
#配置dump日志记录
daemonize=uwsgi.log


apache httpd-vhost.conf配置


        DocumentRoot "/usr/local/apache2/htdocs/mysite3"
        ServerName www.mysite.com
        ServerAlias localhost
        ErrorLog "logs/dummy-host2.example.com-error_log"

        Require all granted

        ProxyRequests Off
        ProxyPass / uwsgi://py1:8001/home/mysite3/


python:3.9.0-buster

httpd:2.4-alpine

django3.1.3

uwsgi2.0.19

本来是弄pypy的 但update-alternatives切换python3.7  uwsgi启动django成功 但浏览器访问不了 

哇 有没有大佬捞下孩子

[悲伤]

Reply Favorite View the author
All Replies
silkapok
deepin
2020-11-21 03:45
#1


css js放上static下面了


Reply View the author
残念
deepin
2020-11-21 07:14
#2

不知道这个行不行,你看一下[困惑]

https://blog.csdn.net/qq_34045989/article/details/90443138

Reply View the author
silkapok
deepin
2020-11-23 21:33
#3
残念

不知道这个行不行,你看一下[困惑]

https://blog.csdn.net/qq_34045989/article/details/90443138

可以了 没有用过django

Reply View the author
silkapok
deepin
2020-11-23 21:34
#4
silkapok


css js放上static下面了


#代理静态资源:路径映射
static-map = /static=/home/mysite3/static

Reply View the author