首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >带有Nginx安装错误的安装代码

带有Nginx安装错误的安装代码
EN

Stack Overflow用户
提问于 2014-12-02 21:46:10
回答 1查看 390关注 0票数 0

我正在尝试在droplet中使用Nginx设置Codiad,尽管我已经为我的用户设置了对Codiad文件的所有权限,但当我导航到这些文件时,Codiad一直向我发送"Installation Error“消息,如下所示:

代码语言:javascript
运行
复制
Installation Error

Please make sure the following exist and are writeable: 
[SYSTEM]/config.php - ERROR 
[SYSTEM]/workspace - ERROR 
[SYSTEM]/plugins - ERROR 
[SYSTEM]/themes - ERROR 
[SYSTEM]/data - ERROR

下面是我的nginx配置:

代码语言:javascript
运行
复制
server { 
listen 8081; ## listen for ipv4; this line is default and implied 
listen [::]:8081 default ipv6only=on; ## listen for ipv6

root /var/www/html/codiad; 
index index.php index.html index.htm;

# Make site accessible from http://localhost/ 
server_name domain;

location / { 
# First attempt to serve request as file, then 
# as directory, then fall back to index.html 
try_files $uri $uri/ /index.html; 
}

error_page 404 /404.html;

# redirect server error pages to the static page /50x.html 
error_page 500 502 503 504 /50x.html; 
location = /50x.html { 
root /var/www/html; 
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 
location ~ \.php$ { 
try_files $uri =404; 
fastcgi_pass unix:/var/run/php5-fpm.sock; 
fastcgi_index index.php; 
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
include fastcgi_params; 
} 
}

此外,以下是当前设置的权限:

代码语言:javascript
运行
复制
ls -l /var/www/html/codiad/

total 124 
-rwxrwxr-x 1 cae cae 370 Dec 2 05:01 AUTHORS.txt 
-rw-rw-r-- 1 cae cae 11357 Dec 2 05:01 common.php 
drwxrwxr-x 16 cae cae 4096 Dec 2 05:01 components 
-rw-rw-r-- 1 cae cae 1127 Dec 2 05:01 composer.json 
-rw-rw-r-- 1 cae cae 1612 Dec 2 05:01 config.example.php 
-rw-rw-r-- 1 cae cae 1612 Dec 2 05:02 config.php 
-rwxrwxr-x 1 cae cae 1489 Dec 2 05:01 CONTRIBUTING.md 
drwxrwxr-x 2 cae cae 4096 Dec 2 05:01 data 
-rwxrwxr-x 1 cae cae 1150 Dec 2 05:01 favicon.ico 
-rwxrwxr-x 1 cae cae 17210 Dec 2 05:01 index.php 
-rwxrwxr-x 1 cae cae 634 Dec 2 05:01 INSTALL.txt 
drwxrwxr-x 2 cae cae 4096 Dec 2 05:01 js 
drwxrwxr-x 2 cae cae 4096 Dec 2 05:01 languages 
drwxrwxr-x 2 cae cae 4096 Dec 2 05:01 lib 
-rwxrwxr-x 1 cae cae 1133 Dec 2 05:01 LICENSE.txt 
drwxrwxr-x 2 cae cae 4096 Dec 2 05:01 plugins 
-rwxrwxr-x 1 cae cae 672 Dec 2 05:01 README.md 
-rwxrwxr-x 1 cae cae 24394 Dec 2 05:01 style_guide.php 
drwxrwxr-x 3 cae cae 4096 Dec 2 05:01 themes 
drwxrwxr-x 2 cae cae 4096 Dec 2 05:01 workspace

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2015-01-27 12:36:33

您的权限似乎属于您的用户。您必须将目录的所有权更改为www-data。运行以下命令:

代码语言:javascript
运行
复制
sudo chown -R www-data:www-data ./*
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27250982

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档