apache虚拟主机多个网站无法正常工作

时间:2019-04-04 16:22:03

标签: python reactjs apache

我在apache中的多网站设置无法正常工作。我的端口为7999的网站正在运行,但8999无法运行。我收到403,您无权访问此服务器中的/。我不确定我想念什么。

这是我的httpd.conf文件

  1. 我没有评论虚拟主机

    包含conf / extra / httpd-vhosts.conf

  2. 我已启用“监听”端口80、7999、8999

  3. 这是我位于C:\ Apache24 \ conf \ extra \ httpd-vhosts.conf文件中的虚拟主机配置文件

    <VirtualHost *:8999>	
	    DocumentRoot D:/app_inventory/app_inventory_frontend/build
	    Alias /static "D:/app_inventory/app_inventory_frontend/build/static"
	    <Directory "D:/app_inventory/app_inventory_frontend/build/static">
		    Require all granted		
	    </Directory>
    </VirtualHost>

    <VirtualHost *:7999>	
	    DocumentRoot D:/app_inventory/app_inventory_backend/src	
	    Alias /static "D:/app_inventory/app_inventory_backend/venv/Lib/site- 
       packages/rest_framework/static"
	    <Directory "D:/app_inventory/app_inventory_backend">
		    Header set Access-Control-Allow-Origin "*"
		    Header set Access-Control-Allow-Headers "*"
		    Header set Access-Control-Allow-Methods "*"
		    Require all granted
	    </Directory>
	    <Directory "D:/app_inventory/app_inventory_backend/">
		    <Files wsgi.py>
			    Require all granted
		    </Files>
	    </Directory>
    </VirtualHost>

0 个答案:

没有答案