w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
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

Unknown error nginx
You can only specify options for the listen directive once per combination of host:port (see the documentation). The error is being caused by this line in your second file: listen [::]:80 ipv6only=on; Because the first file has the ipv6only=on option, the second file does not need it. Changing the beginning of the second file to the following should fix the problem: server { listen 80; listen [::]:80; ... }

Categories : Nginx

403 forbidden error at Nginx
You stated: ls -ld /home drwx------ 4 mysite mysite 4096 Jul 20 18:39 mysite If nginx is running as an ordinary user, presumably as something other than "mysite", then it cannot access /home as only the mysite and root users have this permission. To find out what user nginx is running as type: ps faxu .. and search for the nginx process. To get the nginx user just do ps faxu | grep nginx

Categories : Nginx

PHP Fatal error with nginx
Looking at your example error it appears you are not formatting the require correctly. It should look something like this: require_once(TEMPLATEPATH . '/functions/theme-functions.php'); Make certain that you are also defining your TEMPLATEPATH. define("TEMPLATEPATH ", "/this/is/your/path"); In the end, this should output a string: /this/is/your/path/functions/theme-functions.php

Categories : PHP

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

Omniauth error -- PG::Error: ERROR: duplicate key value violates
You have a unique constraint on the email field. Because this field is defined as not nullable and has a default value of "" (empty string). This means if you don't specify the email, your DBMS will set this field to "". Of course, because it has a unique constraint, you'll only be able to add two users without email, because only one can have the empty string email. If you didn't create the constraint manually, then I assume rails has created it for you (because there's an index on the email field too apparently) by assuming the first field is the table primary key, since you didn't specify any. This made it create both an index and a unique constraint on it.

Categories : Ruby On Rails

Permission error zc.buildout with nginx
Port 443 is below 1024, which means it is a protected port, only open-able by root. So your buildout is correct, you're just running into a 30 old unix restriction :-) Starting nginx on port 8443 or so will probably work fine. An option: run it on an unprivileged port from buildout, but redirect traffic there from some globally installed server.

Categories : Ubuntu

nginx -> php5-fpm: Error in php not logged (anywhere!)
search for catch_workers_output in your pool and set it to yes, from the doc: catch_workers_output - Redirect workers' stdout and stderr into main error log. If not set, they will be redirected to /dev/null, according to FastCGI specs. Values "yes" or "no" EDIT: also check you have php_flag[display_errors] = on and/or php_admin_flag[log_errors] = true

Categories : PHP

Error in path in GlassFish app when using Nginx
The link on your landing page is generated by the upstream app server. Without changing that, you have to tell nginx how to serve that url. One solution could be adding the following location block: location /Calenicon/ { proxy_pass http://localhost:8080; proxy_set_header X-Real-IP $remote_addr; }

Categories : Java

Nginx not running with no error message
Check the daemon option in nginx.conf file. It has to be ON. Or you can simply rip out this line from config file. This option is fully described here http://nginx.org/en/docs/ngx_core_module.html#daemon

Categories : Nginx

Server Blocks in nginx - 502 Error
The 502 code means 502 Bad Gateway, The server was acting as a gateway or proxy and received an invalid response from the upstream server. It usually means the backend servers are not reachable, which could be a problem with them, not with your front-end configuration. On the machine running Nginx, you should test that you can rest the backend servers. Using w3m or another HTTP client on that machine, check these URLs. Do they load what you expect? http://<my_ip_server_1>:80 http://<my_ip_server_2>:80 If not, you may have some updates to make sure that your Nginx server can reach the backend servers. I should add, you may need send the Host: header to get the backend servers to serve the expected content, if they each host multiple virtual domains. I like to use GET and

Categories : Nginx

nginx mysterious error despite right configuration
The editor that you used to edit /etc/nginx/sites-enabled/default left a temporary file default~ (note this ~ suffix) in your /etc/nginx/sites-enabled/ directory. You should delete it.

Categories : Nginx

Meteor WebSocket handshake error 400 with nginx
if you are receiving this error client side in the browser console, you can safely ignore it - it means that your hosting does not support websockets and meteor will fallback to using long polling instead meteor apps deployed to heroku or any other platform without websockets will get the same error update: as of meteor v0.6.4 you can now set the environment variable DISABLE_WEBSOCKETS to prevent this attempt from occurring if you know it will fail https://github.com/meteor/meteor/blob/devel/History.md If you set the DISABLE_WEBSOCKETS environment variable, browsers will not attempt to connect to your app using Websockets. Use this if you know your server environment does not properly proxy Websockets to reduce connection startup time.

Categories : Node Js

502 Bad Gateway error Nginx and uWSGI in deploying Flask app
With uwsgi_pass 127.0.0.1:9001; you declared to Nginx your intent to talk to uWSGI through TCP socket, but have not warned uWSGI about it. Try adding a corresponding socket line to your /etc/default/uwsgi file: PYTHONPATH=/var/www/reframeit-im MODULE=wsgi socket=127.0.0.1:9001

Categories : Nginx

Avoiding Django's 500 error for not allowed host with Nginx
It depends on your default configuration, but from this answer on ServerFault you must define a default vhost in Nginx, otherwise it will use the first one as a default. Basically, your configuration should look like this in order to allow only requests to "mywebsite.com.br" to pass: server { listen 80 default_server; location / { # or show another site return 403 "Forbidden"; } } server { listen 80; server_name mywebsite.com.br; location / { uwsgi_pass unix:/opt/project/run/brmed_web.sock; include uwsgi_params; } } If you need to also serve up other subdomains (www.mywebsite.com.br, etc.) you can set the server_name to ".mywebsite.com.br".

Categories : Django

Mixed content error when proxying websocket through nginx with SSL
Change match original protocol to match origin protocol: io.configure(function() { //io.set('match original protocol', true); io.set('match origin protocol', true); ... }

Categories : Node Js

Nginx, Play and Angular Access-Control-Allow-Origin error
What you need is Nginx to act as proxy, and redirect requests to a specific subpath to Play, while serving the HTML files for the other requests. The documentation of Play has some information on that.

Categories : Angularjs

Flask + uwsgi + nginx + debug. 502 error instead of debugger page
Flask debug=True does not work when going through uWSGI may help. Essentially, uwsgi is not intended for development environments where you want debugging info in the browser. It's a production server. possibly adding in app.debug = true may help, after you have instantiated the Flask object, but otherwise, to get a proper debugger, use the flask internal server for development.

Categories : Nginx

nginx 403 forbidden error in Rails 4 (with no index.html file)
You'll need to pass the request from Nginx to Unicorn. You can do this like so: server { listen *:80; root /vagrant/public; location / { # Serve static files if they exist, if not pass the request to rails try_files $uri $uri/index.html $uri.html @rails; } location @rails { proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:8080; } } You may have to change the proxy_pass url. By default, unicorn will listen on 127.0.0.1:8080 but, if you have changed that, then you will need to specify that port.

Categories : Ruby On Rails

error on installing passenger nginx module on ubuntu with ruby 2.0.0 via rvm
You have to install development tools first. Most likely you're missing some libraries just like the error is indicating. I ran into the same thing a couple weeks back. Here is a nice tutorial similar to the one that helped me out. http://alexpearce.me/2012/06/setting-up-a-vps/ With a little bit of luck, I believe that this line will solve your current issues, but be sure to look over the whole document. sudo apt-get -y install curl git-core python-software-properties build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libcurl4-openssl-dev Also: I've also always had troubles when using rvm and have found that rbenv works with less hiccups, which is actually mentioned in this tutorial. For databases, if you aren't using postgres then you should be able to just swap out the

Categories : Ruby On Rails

Duplicate certificate error
I found the solution , you have to go to Certificates (Local Computer) > Personal > Certificates. Make sure you choose Computer Account when you use the Certicates mmc snap-in and youn will find the duplicate

Categories : Dotnet

Duplicate error in transactions
Check if MachineNumber exists before attempting to update. You can use EXISTS or COUNT For instance: DECLARE @Exists INT SELECT @Exists = COUNT(MachineNumber) FROM TblProduces WHERE MachineNumber = @machinNum IF @Exists = 0 BEGIN -- Perform UPDATE END

Categories : SQL

Doctrine2 Duplicate key name error
Not sure it is the cause of the Exception, but there is an error in your ORM mapping. $myFriends is the owning side, $friendsWithMe is the inverse side, so inversedBy attribute should be only present on $friendsWithMe. Try to rewrite $myFriendswith mappedBy attribute : /** * @ORM ManyToMany(targetEntity="User", mappedBy="friendsWithMe") * @ORM JoinTable(name="friends", * joinColumns={@ORM JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM JoinColumn(name="friend_user_id", referencedColumnName="id")} * ) **/ protected $myFriends;

Categories : PHP

Marking duplicate id gives error
You can 'fool' MySQL when using another subquery to cover that up that you can't select from a table that you are updating update event set repeated = 1 where eid in ( select * from ( SELECT eid FROM event group by eid HAVING count(eid) > 1 ) x )

Categories : Mysql

How to troubleshoot "Duplicate zip entry" error?
The Eclipse build process creates an intermediary jar C:workspaceMyMainLibinmymainlib.jar, which ProGuard subsequently reads as input jar. At that point, it spuriously seems to be truncated. Maybe there are problems with the file system? You can check if the intermediary jar isn't corrupt, after the build. If it is ok, the problem might be that the file hasn't been flushed to disk when ProGuard reads it. The only workaround I see is to use Ant to perform the release build.

Categories : Misc

duplicate row.names (index) error in zoo
The issue is not so much with zoo as it is with the arguments to as.POSIXct Have a look at as.POSIXct(x$Index) and you will see that it is not giving the results you require. Giving as.POSIXct a time zone will help. Compare: as.POSIXct(x$Index) # [1] "2008-03-09 01:00:00 EST" "2008-03-09 01:00:00 EST" as.POSIXct(x$Index, tz = "GMT") # [1] "2008-03-09 01:00:00 GMT" "2008-03-09 02:00:00 GMT"

Categories : R

Error: Duplicate entry for key 'PRIMARY'
Try like: $sql = "SELECT * FROM tbale_name WHERE ID='$id'"; $result = mysql_query($sql); $numRows = mysql_num_rows($result); if($numRows>0) { echo "This ID is already in use, please try another ID?"; } else { //Insert query here }

Categories : PHP

Error: Duplicate entry '0' for key 'PRIMARY'
The problem in set ID = $ID Try removing it so the code should be $sql="UPDATE `dati` `title`= '$titletxt',`value1`='$value1',`value2`='$value2' WHERE 1"; Be sure to change this where cause it'll update ever row with these values

Categories : Mysql

JSF with Primefaces Menu duplicate Id error?
I completely re-write the code and there was no error afterwords. I think that although I couldn't trace any duplicate Ids in previous time, there must have been one. This time also the same error occurred and I found that there is a duplication introduced by myself. If anyone get the same error, I think there is a very high possibility that it is caused by duplicates in manual insertion of duplicate ids.

Categories : JSF

Maven duplicate tag "dependencies" error
Yes, the console is telling you what you need to do. just remove duplicated tag <dependencies>, if you want to add more dependency, just add new tag <dependency> in existing <dependencies> tag!

Categories : Java

Duplicate class error with Groovlets
I could not go deep enough to resolve the strange behavior, but there was an easier solution. I added this to direct all the requests to a single script. <init-param> <param-name>resource.name.replacement</param-name> <param-value>CatchAll.groovy</param-value> </init-param> <init-param> <param-name>resource.name.regex</param-name> <param-value>/.*</param-value> </init-param>

Categories : Groovy

mongo _id field duplicate key error
Likely, it's because you have an index that requires a unique value for one of the fields as shown below: > db.servers.remove() > db.servers.ensureIndex({"name": 1}, { unique: 1}) > db.servers.insert({"_id": "1.2.3"}) > db.servers.insert({"_id": "1.2.4"}) E11000 duplicate key error index: test.servers.$name_1 dup key: { : null } You can see your indexes using getIndexes() on the collection: > db.servers.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "test.servers", "name" : "_id_" }, { "v" : 1, "key" : { "name" : 1 }, "unique" : true, "ns" : "test.servers", "name" : "name_1" } ]

Categories : Mongodb

Mongoose upsert duplicate key error
You're including level in the update query criteria parameter, so if that doesn't also match the existing record it will try and create a new doc which will fail the unique index which only spans skill and resource. Try changing your update to this: ResourceSkillLevel.update({ resource: self._id, skill: skill._id }, {$set: {level: level}}, {upsert: true}, cb);

Categories : Node Js

Duplicate error messages with validates_associated
Here: c.errors.full_message #=> ["Brands is invalid", "Brands is invalid"] It's return two error message for each, because one for object of brands and other for brand field validation error messaage. So, c.brands.last.errors.full_message is right way to validation.

Categories : Ruby On Rails

MongoDB insert raises duplicate key error
You need to understand that your entries list has a bunch of references to one entry dict. So when PyMongo sets entries[0]['_id'], all the other entries get the same _id. (In fact, PyMongo will iterate through the list setting each entry's _id, so all the entries will have the final _id at the end.) A quick fix would be: entries.append(entry.copy()) This is merely a shallow copy, but in the code you shared I believe this is enough to fix your problem.

Categories : Python

Why is my app crashing? I can't duplicate the error, but received this crash log:
I'm no expert of this, but it looks like an exception was raised when you called compare on an NSNumber and used the incorrect format. My guess is that you tried to compare a number to something else, possibly a string.

Categories : IOS

Duplicate id error with primefaces dialog in template
The prolbem was binding attribute on datatable. See also: I'm getting 'Duplicate id error' after adding 'binding' attribute SessionScoped component was used in multiple views. I've used EL-table binding and then the problem was disappeared.

Categories : JSF

MySQL default value error with ON DUPLICATE KEY UPDATE
You're getting error because The user_id column is defined as NOT NULL The user_id column doesn't have a default value specified You don't specify its value in your query either PS: the question is irrelevant to the ON DUPLICATE KEY UPDATE clause - it would be the same error if you didn't use it as well. PPS: regardless of if the ON DUPLICATE KEY UPDATE triggered - your insert should satisfy all the constraints

Categories : Mysql

Skip a record after a duplicate error (except IntegrityError)
What you are doing (especially if you have many records) is executing many queries and that is highly inefficient. Thus, it would be a better idea to build a query to detect duplicates. For the future you should still keep the unique constraint to avoid further conflicts, but for the transition (or whatever your are doing there) it is far more efficient to have such a query. You could even transform the results into a dictionary, because that is often more efficient if you need to look up stuff by a key. Furthermore, concerning speed, use a set instead of a list if you need to do something like value in duplicates because it is more efficient. Now if you'd like to keep your old way, use savepoints. The idea here is that you say "okay so far I am fine, let's keep this so when I roll back

Categories : Python



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