Creating nginx .conf file

The software was developed using apache, for use it ngnix servers your website.conf under /etc/nginx/vhosts/ has to look like the code bellow

autoindex off;

location / {
rewrite ^/([A-Za-z0-9-]+)/?$ /index.php?page=$1;
rewrite ^/@([A-Za-z0-9_.]+)/?$ /index.php?page=profile&id=$1;
rewrite ^/@([A-Za-z0-9-]+)/([A-Za-z0-9-]+)?$ /index.php?page=profile&id=$1&s=$2;
}

location /profile {
rewrite ^/profile/([0-9]+)/([A-Za-z0-9-]+)/?$ /index.php?page=profile&id=$1;
}

location /administrator {
rewrite ^/administrator/editor/theme/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /administrator/editor/index.php?theme=$1&preset=$2;
rewrite ^/administrator/([A-Za-z0-9-]+)/?$ /index.php?page=admin&p=$1;
}

location /m_profile {
rewrite ^/m_profile/([0-9]+)/([A-Za-z0-9-]+)/?$ /mobile.php?page=profile&id=$1;
}

location /chat {
rewrite ^/chat/([0-9]+)/([A-Za-z0-9-]+)/?$ /index.php?page=chat&id=$1;
}

location /search {
rewrite ^/search/([A-Za-z0-9-]+)/?$ /index.php?page=logout;
rewrite ^/search/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /index.php?page=logout;
}

location /mobile {
rewrite ^/mobile/([0-9]+)/([A-Za-z0-9-]+)/?$ /index.php?page=&id=$1;
}

Last modified on Oct 30, 2019
Having troubles?
Go to the Help center and search in our articles or send us an email at support@premiumdatingscript.com