0
votes
1answer
30 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
0answers
28 views

Dropbox redirect in Nginx [on hold]

I've been trying to translate Lee Byron's dropbox redirect to Nginx. His method uses .htaccess and php. I think ive got it working but as im inexperienced, maybe theres a better way of going around ...
0
votes
1answer
51 views

How to disable nginx basic_auth for one location but enable it for the rest of the site

I'm trying to get basic_auth disabled for a specific directory /api/ but still have basic auth for the rest of the site i'm working with. The following is my nginx.conf: server { # base settings ...
1
vote
1answer
112 views

Nginx htaccess rewrite specified folder

I tried to convert this htaccess rules to nginx: apache # Necessary to prevent problems when using a controller named "index" and having a root index.php # more here: ...
-2
votes
1answer
40 views

Where to save nginx rewrite rules? [closed]

I am thinking about replacing apache webserver with nginx but some websites use .htaccess file and I want to ask... it is possible to declare rewrite rules inside website directory and not in server ...
0
votes
1answer
71 views

convert lighttpd to nginx rewrite rules

I'm trying hard to make my code work on nginx. This configuration works with lighttpd but I want migrate it to nginx. Rewrite rules on lighttd : url.rewrite-once = ( "^/(ui)/(.*)$" => ...
0
votes
1answer
86 views

Converting Drupal Boost .htaccess to Nginx

I'm trying to install Boost module to work with nginx. As we know Boost does not generate nginx directives just like Apache. Boost has the following directives for Apache's .htaccess: ### BOOST ...
0
votes
1answer
65 views

Trouble converting .htaccess rewrite rules for nginx

Hi all I am trying to convert the following .htaccess code <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
164 views

Cache Busting and Include Files for Nginx

In Apache you can use the following to cache bust css and js files and server them as a single file with Apache's Include mod: <FilesMatch "\.combined\.js$"> Options +Includes ...
0
votes
1answer
74 views

Nginx complete folder protection not working

I have installed nginx(1.4.3) with PHP-FPM(5.4.20). i want to protect my wordpress wp-admin folder. my nginx configuration file domain.conf: server { listen 80; server_name example.com; ...
1
vote
1answer
236 views

Nginx 404 error page php with params

In Opencart, 404 error is shown in this url: /index.php?route=error/not_found This page has a 404 custom page with the template of all the website. I´ve tried in Nginx with: error_page 404 = ...
1
vote
2answers
3k views

nginx and owncloud, .htaccess security warning

I have a problem with nginx and owncloud. When i access the owncloud's login page i get this error: Your data directory and your files are probably accessible from the internet. The .htaccess ...
0
votes
2answers
441 views

Enable Cross Origin Scripting on Nginx from retina.js to load files from another URL?

Im running a retina image plugin along with W3 Cache for CDN support. W3 cache moves images to S3, but the JS file won't server the files from there due to the difference in URL (it goes from h ...
0
votes
1answer
55 views

Converting .htaccess to nginx rule

No matter what tools I try, it never works quite right. I have an api, that is called at /api/v1/method.format?arg1=x&arg2=x I have this .htaccess on /api/v1/: RewriteEngine on RewriteCond ...
0
votes
1answer
57 views

Converting .htaccess to nginx

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) p.php?id=$1 [L,QSA] How would I change that to work with nginx? Also, where do I place ...
0
votes
1answer
133 views

Convert .htaccess http authorization to nginx

I need to convert the following .htaccess string to nginx config: RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] Can anyone help me? I'm running nginx + php_fpm configuration.
0
votes
1answer
348 views

.htaccess to Nginx for specific script/folder?

I've installed a script in a sub folder which relies on .htaccess rewrite rules - if you visit the script once install properly it redirects you a /login page which actually doesn't exist on the ...
0
votes
1answer
123 views

converted .htaccess to nginx is breaking my app

I have been working on this all day and still am not having no luck. I used an online .htaccess to config converter and so I don't think it converted everything correctly. The following is my ...
-1
votes
1answer
67 views

Converting rules from apache to nginx

I have problem with these rules: ErrorDocument 500 http://example.com/500.html RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] RewriteCond ...
0
votes
2answers
173 views

simple nginx rewrite rule

I need to rewrite (convert) this basic htaccess rules to nginx format. Can you help me? Thanks. RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f ...
0
votes
2answers
82 views

Allowing users with a dynamic htaccess across multiple servers

We have an application that is IP restricted via an .htaccess file. Another application is used to request access and updates the .htaccess with the users IP for a period of time. The current server ...
1
vote
2answers
97 views

Easiest way to implement url rewriting for multiple VHost on Nginx

I have a lot of Vhost on my server, and I'm looking for a way to easily configure Url rewriting without having to open Putty, connect on SSH and editing with vim. Is it possible to put the rewrite ...
0
votes
1answer
203 views

nginx: rewrite a non-existent php-file to another php-file with all arguments

i really need help here. Sitting for some time now and dont figured it out. I want to realize a very simple task - rewrite a non-existent php file to another existant php file with all arguments ...
0
votes
1answer
128 views

Migrating Apache rewrites to Nginx

I am trying to serve static HTML with server side PHP processing with Nginx. I have no experience with Apache. I would like to migrate the following re-writes from Apache's .htaccess to Nginx. What ...
2
votes
2answers
600 views

How to dynamically reload nginx config

I'm currently trying to setup Nginx for a domain with production, testing and development stages. Each comes with it's own partial Nginx config file with rewrites. The production and testing stages ...
2
votes
2answers
116 views

How to serve different application & server based on cookie

I'm building the frontend marketing website for a web application. The frontend is WordPress on one server and the app is on another. We will set a cookie for users who are already customers. For ...
1
vote
1answer
588 views

.htaccess 500 internal server error , bad flag

I'd like to add the following to my Magento .htaccess file: RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/ RewriteRule ^index.php$ http://www.mystore.com/ [R=301,L] However ...
0
votes
1answer
82 views

How to convert this .htacess to nginx

I need to convert RewriteEngine on RewriteBase /generate RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/(.*)/ index.php?file=$2 To nginx conf Can ...
8
votes
1answer
17k views

What is the name and location of the Nginx config file (htaccess equivalent)?

There are many tutorials on how to write Nginx rewrite rules to mimic Apache's .htaccess file but I can't confidently say I know what the name or location of this so-called Nginx config file actually ...
0
votes
1answer
214 views

Need help translating this htaccess rewrite rule to Nginx

Hi – I've been struggling with this for days. It seems simple but I just can't get it done. I have a site developed in CakePHP. There's a script that responds to /css/profiles/g/whatever.css ...
1
vote
1answer
136 views

How do I replicate my .htaccess functionality in NGINX

I have the below .htaccess file in apache that redirects all request to app/index.php with or without a GET parameter. I just installed NGINX and my application won't run. Can anyone assist in ...
0
votes
2answers
299 views

nGinx non-www to www redirect

I have been working with apache for years and now wanted to move to nGinx keeping in view the performance everyone on internet seems to be talking about. But I its very frustrating for me for not ...
0
votes
2answers
183 views

nginx rewrite rules for bamboo invoice

I just migrated a webserver from Apache to nginx and I can't get the .htaccess conversion to work properly. The app I'm trying to use is bamboo invoice [http://bambooinvoice.org/], and it comes with a ...
-3
votes
1answer
187 views

Magento Using https:// for all links in source

So today I was trying to install a fresh instance of Magento v1.7.0 on my vps which is running nginx. Once I uploaded the clean install to public_html I unzipped it and entered my ip to run the ...
0
votes
1answer
128 views

Move from apache to nginx: 3rd party .htacces files. any recommendations?

I am considering moving from apache to nginx. However, there is one problem I don't really know how to handle best: On my server I have some 3rd party software, e.g. phpbb, phpmyadmin etc., and these ...
1
vote
4answers
510 views

Htaccess strange behaviour with Nginx

I have a site running on Nginx (v1.0.14) serving as reverse proxy which proxies requests to Apache (v2.2.19). So Nginx runs on port 80, Apache is on 8080. Overall site works fine except that i cannot ...
1
vote
2answers
4k views

What is nginx equalant for my htaccess mod_rewrite?

Previously i was using linode VPS running Apache for my CodeIgniter website. Today i installed nginx and my website landing page is coming but the other pages that is using htaccess for rewriting URL ...
1
vote
1answer
534 views

Convert nginx to Apache rewrites

I'm trying to set up CodeIgniter from an existing site that's on nginx. My local machine is Apache and this is the redirect scheme on nginx. How do I write this using RewriteRules? if ($host ~* ...
0
votes
1answer
412 views

apache rewrite > nginx rewrite

I finnaly got nginx running my site are made with codeigniter and I have this old rewrite from my .htaccess #map all request urls to a specific controller method RewriteRule ^(.*)$ ...
0
votes
0answers
249 views

apache mod-rewrite to nginx rewrite

I just changed to NGINX from Apache and I am using Zencart with Ultimate SEO for friendly urls I have tried to convert my .htaccess rules for NGINX but I get "No Input file specified" or a 404 error. ...
1
vote
1answer
274 views

how to convert this .htaccess from Apache to Nginx?

I need to convert this .htaccess to Nginx format, please guide me if you can. DirectoryIndex index.php FileETag none ServerSignature Off Options All -Indexes <IfModule mod_rewrite.c> ...
-5
votes
1answer
308 views

Convert this .htaccess directive to nginx for me

<Files urllist.txt> order allow,deny Allow from xx.xx.91.29 </Files>
1
vote
2answers
654 views

htaccess to nginx (watermark images under nginx)

I recently installed NGINX as a reverse proxy for my apache server, to handle static files. So far so good, everything working fine, except for the fact that I cant watermark my images anymore. My ...
0
votes
1answer
6k views

Htaccess on Nginx

I have one Question. How can I use my Htaccess File on nginx? I have seen something like that: http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ But I don't know if this is working and ...
7
votes
3answers
5k views

Limit upload file size and redirect user to error page if limit exceeds

Is it possible to redirect user to file file too big page when POST request size exceeds specified limit? I am aware about max-request-size option, but it gives just static page that cannot be ...
2
votes
2answers
850 views

.htaccess per directory in nginx

I am new to nginx and I have been on apache before. In apache, each directory can have a .htaccess to target the directory and and it's subdirectories. Is this possible for nginx? If so, how do I do ...
0
votes
3answers
385 views

Apache rewrites to Nginx

I'm trying to install thebuggenie on my Nginx server. Unfortunately, it sits in a subdirectory (nothing I can do about it) and uses apache rewrites for ALL of it's URLs. I had some success when I had ...
1
vote
1answer
574 views

Apache htaccess -> Nginx rewrites

Help me please to write nginx rewrites instead of that Apache htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
747 views

How to chain rewrites in Nginx?

I'm new to nginx's rewrite engine. I'm trying to convert my old htaccess file over to nginx's format but I'm running into some trouble. # ------------------------------------------------------ # # ...
2
votes
1answer
2k views

Convert HTACCESS mod_rewrite directives to nginx format?

I'm brand new to nginx and I am trying to convert the app I wrote over from Apache as I need the ability to serve a lot of clients at once without a lot of overhead! I'm getting the hang of setting up ...