You are not logged in.
Hi guys,
Can you help me? I'm trying use in my home folder. What I have to do? Look at my files, please:
/etc/nginx/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
root /home/myuser/workspace/php;
location / {
autoindex on;
index index.html index.php index.htm;
}
location ~ [^/]\.php(/.*)?$ {
fastcgi_split_path_info ^(.+\.php)(/.*)?$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$uri;
fastcgi_param PATH_INFO $fastcgi_path_info if_not_empty;
}
location ~ /.ht {
deny all;
}
}
}
/etc/php/php-fpm.conf
[www]
user = http
group = http
;listen = 127.0.0.1:9000
listen = /run/php-fpm/php-fpm.sock
;listen.backlog = 65535
listen.owner = http
listen.group = http
listen.mode = 0660
;listen.allowed_clients = 127.0.0.1
/var/log/nginx/error.log
2014/03/24 23:13:19 [crit] 6752#0: *1 stat() "/home/myuser/workspace/php/index.php" failed (13: Permission denied), client: 127.0.0.1, server: localhost, request: "GET /index.php HTTP/1.1", host: "localhost"
I tested a lot of configuration files and I just receive errors. When I set root like /usr/share/nginx/html or /srv/http/ I can access the index.html. But when I try a index.php, for example, not works.
Last edited by antuirno (2014-03-29 20:55:46)
Offline
Offline
Something like this should work:
setfacl -m u:http:x /home/myuser
setfacl -m u:http:x /home/myuser/workspace
setfacl -m u:http:rwx /home/myuser/workspace/php
and all files in /home/myuser/workspace/ with 644 permissions (r)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Everything works now! Thank you so much progandy!
Offline
The server works great now!
But I have some problems with permissions. I installed a script that require a "write" permission. I don't want type chmod 777 in the folders. What the best way to fix that? Do I have to change groups? Like "chown myuser:http -R folder/" ?
Another question: When I type "chmod XXX(for example, 644) -R folder/" why user, groups and size are replaced with "?" symbol on Arch? How I have to do? When I used Ubuntu that works without any problem.
Thanks for your attention!
Last edited by antuirno (2014-03-28 14:06:48)
Offline