# I have a problem with my virtual block

**URL:** <https://www.ruby-forum.com/t/i-have-a-problem-with-my-virtual-block/225547>\
**Category:** NGINX\
**Created:** [January 14, 2013, 6:47pm UTC](https://www.ruby-forum.com/t/i-have-a-problem-with-my-virtual-block/225547 "2013-01-14T18:47:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [January 14, 2013, 6:47pm UTC](https://www.ruby-forum.com/t/i-have-a-problem-with-my-virtual-block/225547/1 "2013-01-14T18:47:25Z")

</div>

hy  
when i try to go to my website in local like  
[http://mediawiki.dedibox.fr/](http://mediawiki.dedibox.fr/), i get the message  
It works!

This is the default web page for this server. etc…

but normally i must have my index.php and not that , i don’ t understand  
why i get this message .

this is my nginx.conf

\*events {  
worker\_connections 1024;  
}

http {  
include mime.types;  
passenger\_root  
/usr/local/xxxx/ruby-1.9.3-p125/gems/passenger-3.0.19;  
passenger\_ruby /usr/local/xxxx/ruby-1.9.3-p125/ruby;  
passenger\_max\_pool\_size 10;

```
default_type application/octet-stream;

sendfile on;

```

## TCP options

```
tcp_nopush on;
tcp_nodelay on;

```

## Timeout

```
keepalive_timeout 65;

types_hash_max_size 2048;
server_names_hash_bucket_size 128;
proxy_cache_path /mnt/donner/nginx/cache levels=1:2 

```

keys\_zone=one:10m;  
gzip on;  
server\_tokens off;

- 
- include /usr/local/xxx/nginx/vhosts-available/_;  
include /usr/local/xxx/nginx/vhosts-available/_.conf;

- 

server {

- 

```
   listen 80;
  passenger_enabled on;
  passenger_use_global_queue on;

  error_log /home/logs/nginx/error.log;
  access_log /home/logs/nginx/access-global.log;

```

}  
}\*
- 

vhosts-available/mediawiki.conf\*

server {

```
        listen 80 ;
        server_name mediawiki.dedibox.fr;
        root /home/sites_web/mediawiki;
        index index.php index.html;
        error_log /home/logs/mediawiki/error.log;
        access_log /home/logs/mediawiki/access.log;

```

location ~ .php$ {

```
       fastcgi_pass 127.0.0.1:9000;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME

```

/home/sites\_web/mediawiki/$fastcgi\_script\_name;  
include /usr/local/centOs/nginx/conf/fastcgi\_params;

```
    }

```

}

thank you very much for your help .  
And have a good day

---

<div class="post-metadata">

**Author:** ![grunk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@grunk](https://www.ruby-forum.com/u/grunk)\
**Post date:** [January 14, 2013, 7:11pm UTC](https://www.ruby-forum.com/t/i-have-a-problem-with-my-virtual-block/225547/2 "2013-01-14T19:11:58Z")

</div>

Your site is using the default server block in conf.d. There is a  
hierarchy in the listen format, looks like the default is above listen  
80; simplest way is to either remove the default, or name your site.

---

<div class="post-metadata">

**Author:** ![grunk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@grunk](https://www.ruby-forum.com/u/grunk)\
**Post date:** [January 14, 2013, 9:33pm UTC](https://www.ruby-forum.com/t/i-have-a-problem-with-my-virtual-block/225547/3 "2013-01-14T21:33:54Z")

</div>

i have change the name in the parameter server\_name , but i continue to  
pointe on It works! etc…

2013/1/14 Steve H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> - 
> - 
> 
> ```
> access_log /home/logs/mediawiki/access.log;
> }
> 
> ```
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Cordialement

Olivier M.  
tel : 06.62.25.03.77
