Welcome to WebmasterWorld Guest from 34.201.121.213

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Location rewrite from Nginx to Apache for Windows

Rewrite

     
8:00 am on Aug 2, 2017 (gmt 0)

New User

joined:Aug 2, 2017
posts:1
votes: 0


Hi All,

I'm new and not really an expert in Apache setup, i would like to set this in Apache Windows, but not sure how i can rewrite it exactly.
Can you please help with it?
Thank you
Source: [github.com...]
server {
listen 192.168.1.1:80;
server_name vpsXX.ximiraga.ru api.ximalaya.com;
root /zdata/www/miradio;
index index.php index.html index.htm;
// access_log /var/log/nginx/radio_access.log;
// error_log /var/log/nginx/radio_error.log;
location @ximalaya {
proxy_pass http://api.ximalaya.com;
}

location / {
rewrite ^/(.*).m3u8 /play.php?xid=$1;
try_files $uri $uri/ @ximalaya;
location /openapi-gateway-app/live/radios {
try_files $uri $uri/ /index.php;
}
location /openapi-gateway-app/live/get_radios_by_ids {
try_files $uri $uri/ /index.php;
}

location /openapi-gateway-app/search/radios {
try_files $uri $uri/ /index.php;
}

location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}

location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/etc/nginx/fastcgi_params;
}
}

location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}

}
4:27 am on Aug 5, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Hello Janaboy and welcome to WebmasterWorld [webmasterworld.com]

Thanks for posting. Weekends can be slow here sometimes. Hopefully someone knowledgeable will come along soon.