Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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; #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
up vote 0 down vote accepted

Here's a full tutorial on how to do it:

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

share|improve this answer

Your Answer


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.