Hello Guys..
I'm new around here.
All my life I used cPanel with reverse nginx proxy, but now I want to build a server with nginx and php-fpm.
Everything is configured.
Nginx, mysql, pureftp....
I created two test account
/home/account1
/home/account2
I can access these accounts using
http://account1.myserver.local
http://account2.myserver.local
Like a shared server....all fine here..
MY PROBLEM: Using php's fopen/fget / I can get all dirs and files from account2 from account1...
My folder's config:
drwxr-xr-x. 3 account1 account1 4096 Jun 29 17:53 account1.myserver.local
drwxr-xr-x. 5 account2 account2 4096 Jun 29 18:03 account2.myserver.local
My nginx configuration:
user nginx;
------------------------------------------
My vhost configuration is default..here the important part:
location ~ .php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /home/$server_name/$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
---------------------------
Now, I hope I could explain it...
How can I "isolate" each user on their specific folder?
I don't wan't to user 1 list / edit / view the content of user 2...
How can I do that?
Server specs:
CentOS 6 - PHP 5.4.4 - nginx/1.0.15