Lihat gambar dibawah ini untuk melihat ilustrasinya dan dibawahnya ada file confignya.
File config
server {
listen 80;
root /usr/share/nginx/html/musics-mp3.com/public_html;
index index.php index.html index.htm;
server_name www.musics-mp3.com musics-mp3.com;
if ($host ~* ^www\.(.*))
{
set $host_without_www $1;
rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
}
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location /y-download {
rewrite ^/y-download/(.*)(.*)$ /youtube.php?id=$1;
}
location /s-download {
rewrite ^/s-download/(.*)(.*)$ /soundcloud.php?id=$1;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Semoga bermanfaat, jika ada pertanyaan silahkan komentar dibawah
File config
server {
listen 80;
root /usr/share/nginx/html/musics-mp3.com/public_html;
index index.php index.html index.htm;
server_name www.musics-mp3.com musics-mp3.com;
if ($host ~* ^www\.(.*))
{
set $host_without_www $1;
rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
}
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location /y-download {
rewrite ^/y-download/(.*)(.*)$ /youtube.php?id=$1;
}
location /s-download {
rewrite ^/s-download/(.*)(.*)$ /soundcloud.php?id=$1;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Semoga bermanfaat, jika ada pertanyaan silahkan komentar dibawah
Komentar
Posting Komentar
SILAHKAN BERI KOMENTAR PADA POSTINGAN INI, NOTE! DI FORM KOMENTAR BILA MENGANDUNG LINK AKAN TERDETEKSI SPAM SEHINGGA KOMENTAR ANDA AKAN OTOMATIS SEGERA TERHAPUS