Đã Đóng

Set nginx rewrite rules

Hello,

I have a server running nginx/[url removed, login to view] and I need someone to set some rewrite rules for one of my scripts.

I found the code on the internet, I'm not sure where to put it. The script im using is called xtrafile.

if ($request_filename !~ (index\.php|images|img|css|js|flash|temp|robots\.txt|favicon\.ico) ) {

rewrite ^/(.*) /[url removed, login to view]$1 last;

break;

}

if ($request_filename ~ (file|files|download|imagedirect|thumb) ) {

# Old rewrite rules for Files

rewrite ^/file/(.*)/(.*)$ /[url removed, login to view]$1&name=$2 last;

rewrite ^/files/(.*)/(.*)$ /[url removed, login to view]$1&name=$2 last;

rewrite ^/files/(.*)$ /[url removed, login to view]$1 last;

rewrite ^/download/(.*)$ /[url removed, login to view]$1 last;

# Old Rewrite rules for direct imaging

rewrite ^/imagedirect/(.*)$ /[url removed, login to view]$1 last;

rewrite ^/thumb/(.*)$ /[url removed, login to view]$1 last;

break;

}

location ~ \.php$ {

fastcgi_param PHP_VALUE "register_globals = Off

magic_quotes_gpc = Off

post_max_size = 1000M

upload_max_filesize = 250M

max_execution_time = 600

max_input_time = 600

memory_limit = 320M

short_open_tag = On";

fastcgi_pass [YOUR PHP-FPM SOCKET PATH or 127.0.0.1:YOUR PHP-FPM PORT];

fastcgi_index [url removed, login to view];

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

Kỹ năng: Linux, Nginx

Xem thêm: scripts direct, direct scripts, rules, rewrite script, nginx, imaging, ico, php fpm rewrite, php fpm nginx, fpm rewrite, nginx rewrite php code, php rules rewrite, imaging php, php flash socket, nginx rewrite rules, php location rewrite, php fpm, rules nginx, server name port, nginx linux, nginx php fpm, linux port script, script php rewrite, php script download linux, php nginx

Về Bên Thuê:
( 5 nhận xét ) Dalton, United States

Mã Dự Án: #1689439

8 freelancer đang chào giá trung bình $30 cho công việc này

softcom

I can do this right now.

$30 USD trong 0 ngày
(57 Đánh Giá)
5.5
devservice

I'm experienced system administrator/web developer. Can add rules to your nginx conf without problems. Best regards, Yuriy

$30 USD trong 1 ngày
(5 Đánh Giá)
3.2
codebycarter

Hi MikeyDPI. Ready to start when you are. Kindly check PMB.

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
naviarora

I'm working with nginx from years and have proficiency to do any task in it.

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
eagle1981

I'm expert in nginx. Can add rewrite rules to your configuration without any problems.

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
Z26cUkHE1

Custom Software Development - <b><i>Removed by Admin</i></b>

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
eniki

Can do this easily, linux server admin here! Have long-time experience with nginx and apache ;)

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
rustamt

Hi, I have lots of experience with Nginx and can do this for you.

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
niksharky

Put it in nginx.conf in server section

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0