# Alias to server\_ip/drupal

**URL:** <https://www.ruby-forum.com/t/alias-to-server-ip-drupal/244705>\
**Category:** NGINX\
**Created:** [May 30, 2016, 5:11pm UTC](https://www.ruby-forum.com/t/alias-to-server-ip-drupal/244705 "2016-05-30T17:11:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [May 30, 2016, 5:11pm UTC](https://www.ruby-forum.com/t/alias-to-server-ip-drupal/244705/1 "2016-05-30T17:11:26Z")

</div>

Hello,  
i am rather new to the nginx and i have a trobule with alias from my  
default  
page (http://server\_IP/) to the Drupal (http://server\_IP/drupal). I got  
the  
error message: 404 Not Found. I have no idea what is wrong and i didn’t  
find  
anything with google either. Thanks for your help. These are my configs:

nginx.conf

user nginx;  
worker\_processes auto;  
error\_log /var/log/nginx/error.log;  
pid /run/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
log\_format main '$remote\_addr - $remote\_user [$time\_local]  
“$request”  
’  
'$status $body\_bytes\_sent “$http\_referer” ’  
‘“$http\_user\_agent” “$http\_x\_forwarded\_for”’;

```
access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;

```

keepalive\_timeout 65;  
types\_hash\_max\_size 2048;

```
include /etc/nginx/mime.types;
default_type application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d

```

## directory. # See [Core functionality](http://nginx.org/en/docs/ngx_core_module.html#include) # for more information. include /etc/nginx/conf.d/\*.conf; }

default.conf

server {

```
server_name 46.101.231.239;
root /usr/share/nginx/html;
index index.php index.html index.htm;

location / {

```

alias /drupal/;  
try\_files $uri $uri/ =404;  
}  
error\_page 404 /404.html;  
error\_page 500 502 503 504 /50x.html;  
location = /50x.html {  
root /usr/share/nginx/html;  
}

```
location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME 

```

$document\_root$fastcgi\_script\_name;  
include fastcgi\_params;  
}  
}
