Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 禁止你';您没有访问此资源的权限。使用apache2在digitalocean上部署时_Reactjs_Apache_Ubuntu_Django Rest Framework_Digital Ocean - Fatal编程技术网

Reactjs 禁止你';您没有访问此资源的权限。使用apache2在digitalocean上部署时

Reactjs 禁止你';您没有访问此资源的权限。使用apache2在digitalocean上部署时,reactjs,apache,ubuntu,django-rest-framework,digital-ocean,Reactjs,Apache,Ubuntu,Django Rest Framework,Digital Ocean,在过去的5天里,我一直在尝试在digitalocean上部署react django应用程序,但它不起作用。我已使用此guid部署它,但出现错误403“禁止您没有访问此资源的权限”。 Apache/2.4.41(Ubuntu)服务器,161.35.20.119端口80“ 我已经记录了apache错误,我得到了这个 [Fri Mar 26 12:58:39.849945 2021] [core:notice] [pid 2948:tid 140423263165504] AH00094: Comm

在过去的5天里,我一直在尝试在digitalocean上部署react django应用程序,但它不起作用。我已使用此guid部署它,但出现错误403“禁止您没有访问此资源的权限”。 Apache/2.4.41(Ubuntu)服务器,161.35.20.119端口80“

我已经记录了apache错误,我得到了这个

[Fri Mar 26 12:58:39.849945 2021] [core:notice] [pid 2948:tid 140423263165504] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 26 13:01:33.011075 2021] [mpm_event:notice] [pid 2948:tid 140423263165504] AH00491: caught SIGTERM, shutting down
[Fri Mar 26 13:01:33.227907 2021] [mpm_event:notice] [pid 15470:tid 139825591204928] AH00489: Apache/2.4.41 (Ubuntu) mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
[Fri Mar 26 13:01:33.228180 2021] [core:notice] [pid 15470:tid 139825591204928] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 26 13:14:21.257934 2021] [mpm_event:notice] [pid 15470:tid 139825591204928] AH00493: SIGUSR1 received.  Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Fri Mar 26 13:14:21.314783 2021] [mpm_event:notice] [pid 15470:tid 139825591204928] AH00489: Apache/2.4.41 (Ubuntu) mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
[Fri Mar 26 13:14:21.314810 2021] [core:notice] [pid 15470:tid 139825591204928] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 26 16:00:41.389644 2021] [mpm_event:notice] [pid 15470:tid 139825591204928] AH00491: caught SIGTERM, shutting down
[Fri Mar 26 16:00:41.625263 2021] [mpm_event:notice] [pid 29582:tid 140329193987136] AH00489: Apache/2.4.41 (Ubuntu) mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
[Fri Mar 26 16:00:41.625446 2021] [core:notice] [pid 29582:tid 140329193987136] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 26 16:00:49.491113 2021] [wsgi:error] [pid 29585:tid 140329173669632] [client 84.215.102.211:50612] Attempt to invoke directory as WSGI application: /var/www/html/SamfunnetiBergen/SamfunnetiBergen/
[Fri Mar 26 16:00:49.604457 2021] [wsgi:error] [pid 29585:tid 140329165276928] [client 84.215.102.211:50612] Target WSGI script not found or unable to stat: /var/www/html/SamfunnetiBergen/SamfunnetiBergen/favicon.ico, referer: http://161.35.20.119/
[Fri Mar 26 16:06:16.893930 2021] [wsgi:error] [pid 29584:tid 140329173669632] [client 84.215.102.211:50730] Attempt to invoke directory as WSGI application: /var/www/html/SamfunnetiBergen/SamfunnetiBergen/
[Fri Mar 26 16:06:47.515371 2021] [wsgi:error] [pid 29585:tid 140329140098816] [client 84.215.102.211:50745] Attempt to invoke directory as WSGI application: /var/www/html/SamfunnetiBergen/SamfunnetiBergen/
[Fri Mar 26 16:06:48.282807 2021] [wsgi:error] [pid 29585:tid 140329063806720] [client 84.215.102.211:50745] Attempt to invoke directory as WSGI application: /var/www/html/SamfunnetiBergen/SamfunnetiBergen/
[Fri Mar 26 16:06:48.687099 2021] [wsgi:error] [pid 29585:tid 140329055414016] [client 84.215.102.211:50745] Attempt to invoke directory as WSGI application: /var/www/html/SamfunnetiBergen/SamfunnetiBergen/

因此,如果有人能提供帮助,请原谅,因为我应该在上周将此项目提交给我的学生组织

日志中有一条消息:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

检查这个

你看到这个答案了吗?是的,我看到了,但它不起作用!:(你知道如何解决这个问题吗?我没有域名Yet如果你想访问部署的站点,那么需要域名或ip地址如果161.35.20.119是你的ip地址,你可以使用它而不是域名Yea我添加了以下
选项Symlinks AllowOverride None需要所有拒绝AllowOverride None请求u所有已授予的期权索引均遵循Symlinks AllowOverride None要求所有已授予的##期权索引遵循Symlinks#AllowOverride None#要求所有已授予的#ServerName 161.35.20.119
on
/etc/apache2/apache2.conf
仍不工作:(