Re: nginx reload, stop error

2014-07-18 Thread Robert Paprocki
Where have you configured your pid file? Are you using a custom build, or a distributed package? On 07/18/2014 03:32 PM, Matthew Ngaha wrote: > Hey, when I run './nginx -s reload' or './nginx -s stop' i get this: > > nginx: [error] open() "/usr/local/nginx-1.4.3/logs/nginx.pid" failed > (2

nginx reload, stop error

2014-07-18 Thread Matthew Ngaha
Hey, when I run './nginx -s reload' or './nginx -s stop' i get this: nginx: [error] open() "/usr/local/nginx-1.4.3/logs/nginx.pid" failed (2: No such file or directory) Any ideas why it's trying to open this file that doesn't exist? ___ nginx ma

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread itpp2012
Maybe you should set location as fixed generic and then use root to change where ever it needs to, don't forget to tell php where stuff is if you change root. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251908,251928#msg-251928 ___ nginx m

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread martyparish
I will do that. I guess my main question is: can I use a variable in the location URI? location ^~ /$site_folder/ { It appears that the answer is no. I have confirmed the variable is set from the map block. However, when I use it in location like above, it gets skipped over. I appreciate the

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread itpp2012
Enable debugging and check the logs, or add Lua and dump variables to see what value is doing what (this is how I debug a flow). Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251908,251923#msg-251923 ___ nginx mailing list nginx@nginx.org ht

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread martyparish
Okay, I finally got the mapped variable figured out! map $uri $site_folder { ~^/(?P[a-zA-Z]+)/.*$folder ; } Now, I just need to figure out how to use it in the location block??? This is what I am trying: location ^~ /$site_folder/ {

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread martyparish
Thanks itpp2012 I was actually just experimenting with that approach! I was beginning to have a bit of success too! Not quite there yet though. map $uri $site_folder { #~^/(?P[a-zA-Z]+)/.* $folder; ~^/(?P[a-z]+)/.* $folder; } I saw an example very similar(or

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread itpp2012
Maybe not exactly what your looking for but should give enough to rewrite this for what you want with map. https://gist.github.com/anonymous/68caceb6c935e7120a60 Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251908,251917#msg-251917 ___ ngin

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread martyparish
Thanks Francis! Sorry for not being clear enough. My code base is at: /etc/nginx/html/production/ The "site1, site2, etc..." folders do not exists at all. They are only seen and used in the public URLs. The original config I posted in the first post works, I just don't like it because there wi

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread Francis Daly
On Fri, Jul 18, 2014 at 09:40:43AM -0400, martyparish wrote: Hi there, > I have many separate "sites" to run and they all use the same back end > application(opencart). They also will be under the same domain, in folders. > I don't want to duplicate the application code in each subdirectory. It

Re: Nginx can not upload image to cloudinary (hosted in AWS)

2014-07-18 Thread Francis Daly
On Thu, Jul 17, 2014 at 08:15:11AM -0400, email_ardi wrote: Hi there, There's not much to do with nginx in this question. You probably want to compare the environment that your php script is executed in, in the apache system ($REQUEST and $SERVER are usually interesting), and in the system that

Re: Nginx multiple php sites

2014-07-18 Thread Francis Daly
On Tue, Jul 15, 2014 at 09:15:51AM -0400, devsathish wrote: Hi there, > example.com => /var/www/example/index.php > example.com/blog => /var/www/example/blog/index.php > > I made the first one to work using the following code. Can someone help me > to modify this config to fit the second requi

Re: change stub status layout

2014-07-18 Thread Francis Daly
On Tue, Jul 15, 2014 at 07:46:49AM -0400, cobain86 wrote: Hi there, > hi is there any way to change the stub status website layout > > i need the values in [vlaue] form (so with the [] on the website.) I don't believe there is a configuration way to change the output of that module. You could

Re: Multiple sites under same domain with one app codebase

2014-07-18 Thread martyparish
I have been experimenting with this: location ^~ /[a-zA-Z]+/ { rewrite ^/(.*)/(.*) /$2; } Of course I am getting 404 errors... Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251908,251909#msg-251909 _

Multiple sites under same domain with one app codebase

2014-07-18 Thread martyparish
Hello nginx gurus, First post but I have been reading this board for over a year! My scenario: I have many separate "sites" to run and they all use the same back end application(opencart). They also will be under the same domain, in folders. I don't want to duplicate the application code in each