1. Edit you bind & dns config
Insert this to db.domain.net

blog    IN    CNAME    domain.net.

2. Edit /etc/nginx/sites-available/default
Add this:

server {
    listen 80;
    root /usr/share/nginx/www;
    index index.php index.html index.htm;

    server_name domain.net;
[…]
}

server {
    listen 80;
    root /usr/share/nginx/www/blog;              <-- change this if you want
    index index.php index.html index.htm;

    server_name blog.domain.net;
[…]
}

3. Create new folder at /usr/share/nginx/www/blog

4. Put your file accordingly in the folder

5. Test open the URL e.g. blog.domain.net

By zam

Any Comments?

This site uses Akismet to reduce spam. Learn how your comment data is processed.