w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Install Nginx Passenger Rails on Ubuntu Failed
Try following the advice in Debugging application startup problems on the Phusion Passenger wiki.

Categories : Ruby On Rails

Where is my nginx being configured? Changing nginx.conf still brings me to the 'Welcome to nginx' page
when you rewrited the nginx.conf in the folder of source code of nginx and installed it firstly, it will be copied to /usr/local/nginx/conf/nginx.conf (without specially modification of the configure in the folder of source code). But when you do this secondly, the nginx.conf in the folder of source code will be copied to /usr/local/nginx/conf/nginx.conf.defualt,and it usually don't work unless you use nginx -c /usr/local/nginx/conf/nginx.conf.defualt to assign its configure file evertime. There is a line NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf" in your script above,which indicates the configure file clearly. To handle this, I suggest rewrite /usr/local/nginx/conf/nginx.conf (not the one in the folder of source code) instead.

Categories : Nginx

nginx 403 forbidden under Debian 7
Your issue is that http://localhost/install passes by the second rule of the try_files which is $uri/ so it tries to access install as a folder, but you don't have autoindex on, so it fails with a forbidden error. try_files $uri $uri/ /index.php?$args; I suggest removing the $uri/ part. try_files $uri /index.php?$args;

Categories : Nginx

Restarting nginx: nginx: [alert] Unable to start the Phusion Passenger watchdog because its executable
Passenger takes what you set in the file nginx.conf by passenger_ruby, for example: passenger_root /home/dev/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5; passenger_ruby /home/dev/.rvm/wrappers/ruby-1.9.3-p448/ruby;

Categories : Ruby

Can a server run Nginx for some sites and Apache Nginx Reverse Proxy for others?
server { server_name example.com; location / { # assuming apache is on port 81 for example proxy_pass http://127.0.0.1:81; # to make apache detect the host header proxy_set_header Host $host; } # if you have assets folders, you can let nginx serve them directly, # instead of passing them to apache location /images { # or /css or /js .. etc try_files $uri =404; } } Note: in the case of assets, sometimes some sites serve assets through rewrites, or even handled by the application it self, you can pass it to apache by adding that in the assets location as a fallback like this location /images { try_files $uri @apache; } location @apache { proxy_pass http://127.0.0.1:81; } In apache you create a virtual host <Virtua

Categories : Apache

nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Skype uses port 80,443 by default, those are EXACTLY the http and https ports. Try shutting down skype and restarting nginx. If you are using the 'desktop version' of Skype you can change this setting by the way of tools>options>advanced>connections > untick use port 80 and 443 as alternatives. If you are using the win8 app, the only option seems to be shutting down skype completely or removing it completely. Someone has to confirm the win8 app though, I use linux.

Categories : PHP

How to configure nginx rules so that if one failed it serve the request using another
http://wiki.nginx.org/HttpCoreModule#try_files try_files is your friend, here you can do the order you want to try files and finaly have the proxypass upstream.

Categories : Nginx

(ubuntu) nginx: [emerg] bind() to 0.0.0.0:80 failed (13: permission denied)
the socket API bind() to a port less than 1024, such as 80 as your title mentioned, need root access. here is "Bind to ports less than 1024 without root access" and another easier way is to run nginx as root.

Categories : Nginx

Plesk 11.5 php-fpm.sock failed - resource temporarily unavailable & 502 Bad Gateway NGINX errors
Just to try localize the issue: Switch pm = ondemand to pm = dynamic increase pm.start_servers and pm.min_spare_servers to 4 add pm.max_requests = 500 add pm.status_path - read docs what is it and how it can be used. restart php-fpm service and observe for a while. This changes can be overwritten by plesk, so be aware.

Categories : Nginx

nginx + passenger + rails: do I need to start the rails server or just start nginx?
Set nginx to forward to my rails server using this https://gist.github.com/jeffrafter/1229497 worker_processes 1; error_log /usr/local/var/log/nginx.error.log; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; upstream dev { server 127.0.0.1:3000; } server { listen 80; # You could put a server_name directive here (or multiple) if # you have not setup wildcard DNS for *.dev domains # See http://jessedearing.com/nodes/9-setting-up-wildcard-subdomains-on-os-x-10-6 # If we choose a root, then we can't switch things around easily # Using /dev/null means that static assets are served through

Categories : Ruby On Rails

How can I install qt5 to Debian using commandline?
You should be able to run the qt-installer in a decent debian version. Get Version by: cat /etc/issue On older versions or "unsupported" versions you can still download the sources and build the libraries yourself, which is probably your way to go, since the vortex86-builds are pretty limited in compiler flags. Compiling is rather easy, depending on your needs. The configure script itself gives you a lot of hints regarding possible flags. Another alternative is to find a user-managed repository that has QT5 for your debian version and add this repository to your sources.lst, so you could perform a apt-get install libqt5.

Categories : Qt

MySQL 5.6 install on debian ERROR:
I might not be able to help with the error you're getting. But apt-get install -f mysql-server-5.5 worked for me on Debian Wheezy. Try replacing 5.5 with 5.6 and see if it works as well, and probably precede it with sudo.

Categories : Mysql

How do I install PHP5.4.16 on Debian Wheezy?
You're targeting too specific a version. Repositories won't routinely keep multiple builds of the same package around, so a specific build like 5.4.16-1~dotdeb.1 will be superseded by newer builds. At the moment, listing the files on the repository shows a build of 5.4.19-1~dotdeb.1, but really all you want is to select the latest version of PHP 5.4, and let APT update it in the normal way. If the dotdeb packages are for newer versions of PHP than any other repositories you have installed, it will be the default anyway, so you can just run: apt-get install php5-fpm

Categories : PHP

Can't install Capybara-Webkit on Debian
My initial guess was that the gem's build script couldn't properly locate my qmake for whatever reason and I think that might have had something to do with it as doing export QMAKE=/usr/bin/qmake-qt4 seemed to resolve the issue. If you are a debian user and cannot get this gem to install, try giving these steps a shot. I've not tested out which ones are not required on a clean system but after doing all of them I was able to install the gem. sudo apt-get install libqtwebkit-dev qt4-dev-tools libqt4-dev libqt4-core libqt4-gui qmake-qt4 export QMAKE=/usr/bin/qmake-qt4 gem install capybara-webkit That seems to have done the trick for me.

Categories : Ruby On Rails

Install experimental package on debian
Add deb http://ftp.debian.org/debian experimental main contrib non-free to your /etc/apt/sources.list or into /etc/apt/sources.list.d/experimental.list then execute apt-get update apt-get -t experimental install deluge See Debian Wiki

Categories : Linux

Can't install basic packages on Debian EC2 with Aptitude/apt-get
If you install a package using dpkg that doesn't have all it's dependencies, you can fix it by running: apt-get install -f Note that it will only find packages in your current repositories. If some are still missing, try apt-get update. If that still doesn't work, you will need to find an apt repo which hosts those packages, or install the packages manually.

Categories : Amazon

install debian package with change configuration
Download and extract package sources with apt-get source php5 Edit debian/rules file and add --enable-roxen-zts or --enable-maintainer-zts to COMMON_CONFIG (confirm which one you need with ./configure --help). sudo apt-get build-dep php5 to install build dependencies. From directory where package source were extracted run dpkg-buildpackage -uc -b. Optionally if you have devscripts package installed you may run debuild -uc -b instead of dpkg-buildpackage -uc -b.

Categories : PHP

What packages do I need in order to install scikit-learn on Debian
The exact list of dependencies is written in the the documentation. scikit-learn is available in recent versions of Debian, so if you want to install all the scikit-learn build dependencies at once you can just do: sudo apt-get build-dep python-sklearn Also the Neuro Debian APT repository is updated at each scikit-learn release, so that you can get debian packages for the latest versions from there.

Categories : Python

Trying to install openjdk-7 on Debian 6, dependencies provide some errors
Uniqu3, is this for a server? (I Noticed you're doing it by using ssh) If it is, you should be okay using just openjdk-7-jre-headless as this package does not bring all the dependencies (gnome stuff mostly I believe) you're having problems with

Categories : Misc

Can't get the build process on my Ubuntu PPA to use my debian/install file
I still have no idea why it was screwing me - I was following the Ubuntu packaging guide to the letter - but eventually I got it working. What I ended up doing is: apt-get source zfsync into a completely different directory, then investigating what was in there. In addition to a "zfsync-1.0.0" folder which contained all my stuff, there was a "zfsync" folder that had usr/share/doc in there but no usr/bin at all. I manually created usr/bin/zfsync in the "zfsync" folder, made damn certain that the "debian/install" had "zfsync usr/bin" in it, then did a bzr init, a bzr commit, and a dput ppa:jrssnet/zfsync zfsync_1.0.0-0ubuntu5_source.changes ... and, five or ten minutes later, SUCCESS! Ubuntu's build process actually resulted in not only a .deb, but a .deb that ACTUALLY INSTALLED MY DAM

Categories : Ubuntu

Redirecting to SSL using nginx
In order to use regular expressions for matching locations, you need to prefix the expression with either ~ or ~*: if ($server_port = 80) { location ~ (en|fr)/shop { rewrite ^ https://$host$request_uri permanent; } } From the documentation: To use regular expressions, you must use a prefix: "~" for case sensitive matching "~*" for case insensitive matching Since nginx does't allow location blocks to be nested inside of if blocks, try the following configuration: if ($server_port = 80) { rewrite ^/(en|fr)/shop https://$host$request_uri permanent; }

Categories : Nginx

Git on server with nginx
You need a web frontend for git. Have a look at https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools#Web_Interfaces for an overview

Categories : GIT

htaccess to nginx (help)
Please try the following: server { listen 80; server_name www.website.com; return 301 $scheme://website.com; } server { listen 80; server_name website.com; root /path/to/root; location / { try_files $uri @rewrite; } location @rewrite { rewrite ^/([a-z]+)/?([0-9a-zA-Z]*)/?.*$ /index.php?a=$1&q=$2 last; } }

Categories : Apache

Regex for Nginx
The way you written it means that the / is the one that could appear multiple times, ie /home///////share, to fix it write soemthing like location ~ /home/[^/]+/share { }

Categories : Regex

Nginx and Unicorn Set up Not sure what I am doing
I've never used knife... It might be worth checking out this this blog post about setting up Capistrano, Nginx, and Unicorn - I've always found Capistrano to be a good deployment app (and there's lots of support for it, especially on SO). On Heroku, you don't deploy as you would with Capistrano or any other deployment utility - you simply push to a branch on your Heroku server. See: https://devcenter.heroku.com/articles/git for how to deploy on Heroku using Git.

Categories : Ruby On Rails

When do I need to restart nginx
Probably only when you change its configuration, if you are referring to when your django code changes you have to restart the uwsgi server, usually "touch"ing the wsgi.py file is enough to instruct the uwsgi server. Changes in static files don't require the uwsgi restart (because you usually serve them directly with nginx), and if you don't use cached template loaders, but only the default filesystem loader, you don't require the restart when changing a template either. Note that the cached template loader is usually suggested in production.

Categories : Django

nginx and ssl certificate
This is the .cer file, the .key is the key you used to produce this .cer file, try to remember how you got this .cer file, you probably generated a key file on your device, then created a certificate signing request out of it .csr and then uploaded it to get this certificate correct ? you should already have the key file.

Categories : Ssl

Nginx add sites
well if you're going to use only 1 IP, then it's 1 server block ( 1 virtual host ) server { server_name [domain name or ip]; index index.html; # or php or whatever location /foo { root /var/www/foo/public_html; try_files $uri $uri/; } location /bar { root /srv/www/bar/public_html; try_files $uri $uri/; } } You haven't mentioned what kind of application this is, so it probably need some changes depending if its a php site or rails or any thing else, this would work for static content only like html and images.

Categories : Nginx

PHP htaccess to nginx
@Harinder: There must be some RewriteCond based on which you're applying this RewiteRule The reason why i am saying this is that, according to your RewriteRule RewriteRule ^(.*)$ /all_drivers.php?id=$1 [QSA] whatever that comes as a request, you are sending it to all_drivers.php. And if this is the desired rule, then all the request, no matter what will be send to this file only. Also it will be nice if you give us the complete .htaccess code segment that you want to be translated. And please check if you have configured php execution block correctly with all the required fastcgi directives as this blank php's output comes in the case if you have not passed SCRIPT_FILENAME fastcgi directive.

Categories : PHP

Upgrading Nginx 1.1.9 to 1.4.x
This is what test environments or virtual machines are made for. Your question is quite general and hard to answer this way. Try it out in a test setup. If you don't have that option, read the Changelog. From my experience, I haven't encountered backwards compatibility issues with configurations since 1.0 (before that even, but that's when officially configuration syntax should be considered stable). That's not to say there aren't any.

Categories : Ubuntu

How to use nginx proxy_pass
Try the nginx HttpRewriteModule you dont need a proxy for these(tho). it follows this format: rewrite regex replacement flag | | | | rewrite ^/ http://www.example.com/image/file.aspx?img=1 permanent; Then: location / { rewrite ^/ http://www.example.com/image/file.aspx?img=1 permanent; }

Categories : Node Js

Nginx upstream configuration
Then these can help, check the proxy_next_upstream These directive determines in what cases the request will be transmitted to the next server. Your server block should look like for example: server { location / { proxy_pass http://appcluster; proxy_next_upstream error timeout http_404; } }

Categories : Linux

How to update nginx via Chef
This line: [2013-07-15T18:52:03-04:00] INFO: Processing remote_file[http://nginx.org/download/nginx-1.2.6.tar.gz] action create (nginx::source line 56) Points to line 56 of the source recipe on the nginx cookbook. There you can see that the URL for the source archive is set using this logic: nginx_url = node['nginx']['source']['url'] || "http://nginx.org/download/nginx-#{node['nginx']['source']['version']}.tar.gz" So I guess that node['nginx']['source']['url'] is pointing to version nginx version 1.6. It should be dependent on the node['nginx']['source']['version'] attribute as can be seen here, but maybe there's some attribute loading order at work here that's getting in the way. Try setting node['nginx']['source']['url'] to http://nginx.org/download/nginx-1.4.1.tar.gz while keeping

Categories : Nginx

ToroPHP Router in nginx
This question really belongs on http://serverfault.com, nonetheless: Use try files Rewriting isn't necessary, the desired results can be achieved more efficiently using try_files: server { ... location /api { # try_files $uri $uri/ index.php$uri; try_files $uri $uri/ index.php; } } } Note that it's not necessary to pass the url as an argument to index.php as it's already available as $_SERVER['REQUEST_URI'] (will require trivial modifications to index.php to work).

Categories : Htaccess

Running CKAN behind Nginx
The default installation of CKAN (the one done via package install) sets up CKAN running on Apache with mod_wsgi with Nginx on top. Have at look at the Apache and Nginx configuration files for details on how it is done. Regarding using paster on a production environment, I'd imagine that sooner or later you will hit performance problems, so I would avoid it. You may find this answer useful: Can I use paster on production site?

Categories : Nginx

Nginx not redirecting to 404 page
First of all I'd suggest changing the index rule, bring up the index.php in the beginning, right now you don't have any php handling engine in the config, do you have fastcgi or fpm installed on the server? change index index.html index.htm index.php; to index index.php index.html; after determining which php engine you have I can tell you which lines to uncomment, right now without the php engine nginx should server the php as a normal file, either print it's data on the browser or prompt you to download the php file.

Categories : Linux

How to get status of Nginx HttpCacheModule?
Finally I got an answer myself. Just logging and collecting logs. I wrote a post how to do that, thanks. http://bekkou68.hatenablog.com/entry/2013/06/26/220131

Categories : Caching

Deployement of Play! web app with Nginx
The problem is that you have changed the default port to 9000. Only using localhost/projectname is going through port 80. In order to do it that way you should change your default port to port 80.

Categories : Nginx

chef not loading nginx
Are you using a cookbook manager such as Berkshelf? If not, you should look into that, it can assist you with this problem. (I'm not familiar with chefFile, perhaps this is a cookbook manager). A (not so ideal) option to solve this would be to manually clone the nginx cookbook repo and put it in chef/cookbooks or chef/cookbooks-sources and this would solve your problem.

Categories : Nginx

NGINX / Apache RewriteMap
Check Nginx HTTP Map Module map $uri $new { default http://www.domain.com/home/; /aa http://aa.domain.com/; /bb http://bb.domain.com/; /john http://my.domain.com/users/john/; }

Categories : Apache



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.