Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to enable personal web account for each unix account of my server.

For exemple, I would like to be able to have http://IP/user1, and http://IP/user2.

I have tryed this but it doesn't work.

server {
  listen 82;
  server_name localhost;
  passenger_enabled off;
  location ~ ^/(.*)$ {
    alias /home/$1/www/;
    index index.php index.htm index.html;
  }

  location ~ .php$ {                                                                                                                                                                                                                       
    fastcgi_pass   127.0.0.1:49232; #this must point to the socket spawn_fcgi is running on.                                                                                                                                               
    fastcgi_index  index.php;                                                                                                                                                                                                              
    fastcgi_param  SCRIPT_FILENAME    /WHAT DOES I ADD HERE??/$fastcgi_script_name;  # same path as above                                                                                                                                
    include /etc/nginx/fastcgi_params;                                                                                                                                                                                                     
  }                                                                                                                                                                                                                                        
 }

Do you have any ideas?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Here's a full tutorial on how to do it: http://blog.sbf5.com/?p=16

In short though, you should be able to use $1 if you include that in your php pattern.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.