w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Squid, Enable cache for SSL connection in Squid
SSL encrypts the traffic between server and client so it cannot be read by a middle man. When using Squid as a proxy it simply cannot see the actual content in the traffic and therefore it has no means of caching it. The SSL traffic is just random bits that look different each time even if the same content is transferred multiple times and that is how encryption should work. It simply cannot be cached.

Categories : Ssl

How to configure nginx with multiple server
This should be a good lead for you towards the solution: upstream tornado { server 127.0.0.1:8000; server 127.0.0.1:8001; } upstream geoserver{ server 127.0.0.1:8080; server 127.0.0.1:8081; } server { server_name _; listen 80; location = /tornado { proxy_pass http://tornado; } location = /geoserver { proxy_pass http://geoserver; } } Hope it helps!

Categories : Nginx

How to configure PhpMyAdmin on NGINX (Windows)
server { listen 80; server_name localhost; location / { root C:MHServerwww; index index.php index.html index.htm; } location = / { root C:MHServerwww; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root C:MHServerwww; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ .php$ { root C:MHServerwww; include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; in

Categories : C#

Configure Nginx to use cherrypy framework
You can use uwsgi for serve the cherry application. check this link: http://nileshgr.com/2012/08/27/getting-cherrypy-working-with-uwsgi

Categories : Nginx

How to correctly configure Nginx for PHP (Yii framework and Zurmo)
I don't think you need the if() statement in your *.php block. In my nginx setups that's all i ever needed: # Process PHP files location ~ .php$ { fastcgi_split_path_info ^(.+.php)(/.+)$; # Include the standard fastcgi_params file included with nginx include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; }

Categories : PHP

How to configure proxy servers with puppet nginx?
Use nginx::resource::vhost The source of the repo you are using gives a breakdown of the commands you will need to use: https://github.com/puppetlabs/puppetlabs-nginx/blob/master/manifests/resource/vhost.pp

Categories : Nginx

How to configure Phalcon in the Nginx config file
This is the link to the official phalcon nginx configurations. http://docs.phalconphp.com/en/latest/reference/nginx.html

Categories : PHP

Configure Nginx to serve "/" from a directory already inside root
server{ root /var/www; location = / { root /var/www/home; } location / { } } Reference: http://nginx.org/r/root http://nginx.org/r/location How nginx processes a request Understanding the Nginx Configuration Inheritance Model

Categories : Nginx

How to configure nginx to try_files first, if not exists follow the request_uri
I never tried this my self before but this is how I would write it location / { # or whatever location you see fit to your requirements try_files $uri.html $uri; # I don't know if the `.` needs to be escaped `$uri.html`, you can try both }

Categories : Nginx

How to configure nginx + Unicorn to avoid timeout errors?
Is there a way to handle this kind of problems? Do the job in background. You should have a separate process that gets jobs from queue one by one and processes them. And since it doesn't work with user requests, it can do its job as long as needed. You don't need unicorn for this, just a separate daemon.

Categories : Ruby On Rails

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

Nginx - configure location regex for all static file in sub alias
try to add rewrite directive in sub location. Just like this: location /site1 { location ~* .(jpg|jpeg|gif|png|css|js|ico|xml|rss|txt)$ { rewrite "^/site1/(.*)$" /$1 break; root /path/to/anothersite1; } proxy_pass apache:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; }

Categories : File

configure nginx to get js and css directly from public folder of node.js express site
A 403 forbidden response may be related to the nginx process don't having permission to read the files. Check that the folder public is recursively readable by the user running nginx and change the permissions if needed: sudo chmod -R 744 /root/pathToNodeJsExpressSiteFolder/public

Categories : Node Js

How can I configure nginx and fcgi to call separate executables depending on request-uri
You can do it with nginx and fcgi. The simplest way to do this is, by using spawn-fcgi - First you will need to setup your nginx.conf. Add the following inside the server {} block - location /index { fastcgi_pass 127.0.0.1:9000; include fastcgi_params; } location /contact { fastcgi_pass 127.0.0.1:9001; include fastcgi_params; } location /view_post { fastcgi_pass 127.0.0.1:9002; include fastcgi_params; } Restart nginx and then run your apps listening same ports as declared in the nginx.conf. Assuming your programs are in ~/bin/ folder - ~ $ cd bin ~/bin $ spawn-fcgi -p 9000 ./index ~/bin $ spawn-fcgi -p 9001 ./contact ~/bin $ spawn-fcgi -p 9002 ./view_post Now the requests to localhost/index will forward to your index program and its output will go back to ngi

Categories : Nginx

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

expose_php not work (nginx)
finally I got it . the reason is about the configure options below is the original configure options ./configure --prefix=/usr/local/php-5.3.26 --with-config-file-path=/usr/local/php-5.3.26/etc/ --enable-fpm --enable-debug --with-openssl --with-pcre-regex --with-zlib --with-bz2 --with-curl=/usr/lib/ --with-readline=/lib --with-libxml-dir=/usr/lib --with-mysql=/usr/local/mysql and I changed to the fowlloing ./configure --prefix=/usr/local/php-5.3.26 --sysconfdir=/usr/local/php-5.3.26/etc/ --with-config-file-path=/usr/local/php-5.3.26/etc/ --with-config-file-scan-dir=/usr/local/php-5.3.26/etc

Categories : PHP

Right way to configure JPA to work with any JPA implementation
First of all JPA is a specification, which is being implemented by the ORM framework providers such as Hibernate, Eclipselink etc. To make your application compatible with any implementation of JPA, you should strictly follow JPA specifications, you should not be using any ORM vendor specific features, this will allow your application to work with any ORM framework, however you have to specify the dialect class by your self to interact with a particular database. One thing you can do here is write a properties file which will have all the database name with corrosponding dialect class for that particular database, you can ask user to choose the database and can fetch the related class name(Dialect class name) from the properties file. About using the same application as standalone and

Categories : Java

Nginx auth_basic and rewrite in subdirectory does not work
Use: error_page 404 =200 /my-project/index.php; instead of ugly rewrites: if (-f $request_filename) { break; } rewrite ^(.*)$ /my-project/index.php last; Reference: http://nginx.org/r/error_page http://wiki.nginx.org/IfIsEvil http://wiki.nginx.org/Pitfalls P.S. try_files doesn't work with alias because of bug: http://trac.nginx.org/nginx/ticket/97, but you can replace alias with root directive: http://nginx.org/r/root

Categories : Nginx

nginx: error_page dont work with rewrite
Please take a look at the directive recursive_error_pages, and it works for me. And kudos to Jim D.

Categories : Nginx

Configure eclipse to work with tomcat
Do you want to set docBase to your project's root folder? If this is the case, you can change Default output folder from YourProject/build/classes to YourProject/WebContent/WEB-INF/classes in Java Build Path. And, set docBase to YourProjectRootWebContent in your server.xml. Hope this helps.

Categories : Eclipse

How do I configure Logback to work on CloudBees
You need to have it log to STDOUT or STDERR as appropriate: for example see: file and stdout appenders in logback.xml (might be some better ones out there) - that ensures logs can go to any subsystem and work clustered and when apps migrate.

Categories : Java

Configure Jenkins to work with SVN branches
The Subversion plugin should include a drop-down build parameter option. You can include your base repository and then select either the branches, tags, or trunk. Check this out: How to configure a single Jenkins job to make the release process from trunk or branches? And more info here: https://issues.jenkins-ci.org/browse/JENKINS-10678

Categories : Svn

grails.serverURL with Nginx doesn't work properly
grails.serverURL does not have anything to do with the outside url (except for absolute links generated from grails). You can configure your nginx to handle any domain and internally do the proper redirects. The caching you have described is probably due to the browser cache.

Categories : Tomcat

PyGTK, "do-configure-event" doesn't work?
Name your sources! It seems you're trying to adapt example code from Zetcode you do not fully comprehend. Your problem is: to put your class attribute __gsignals__ into use, you have to derive from gtk.Window. The window instance looks up the signals and therefore its gsignals dictionary has to be filled. At the moment, this dictionary resides in pyapp.

Categories : Misc

How to configure Intellij Idea 12 Community Edition to work with JSF 2.x?
Well, as stated in Intellij Idea's comparision matrix Java EE frameworks, such as Servlets, JSP, JSF, Web Services, CDI, Bean Validation, Web Beans, etc. are supported only in Ultimate Edition. So the answer is JSF is not supported. In order to use CE for this technology you would have to configure everything on your own. I would suggest you to use other IDE, like Eclipse or Netbeans.

Categories : JSF

Cache Yum downloads via squid proxy
Agree, this should be in serverfault. In answer to your question, though: You'll need to comment out mirrorlist= in yum.repos.d/*.repo and uncomment/edit baseurl= - yum's rotating mirrors cause squid to cache the package multiple times, so you have to work around this behavior by specifying only a single mirror.

Categories : Linux

Mongodb replica set auto reconect don't work after down and up for nginx + uwsgi with several processes
After a change in your replica set (no primary, new primary, etc.), the next operation will throw an AutoReconnect exception. After that one failed operation, the underlying PyMongo MongoReplicaSetClient will reconnect to the replica set, and future operations may succeed. If there is a new primary, MongoReplicaSetClient will find it and future operations will succeed. If there is no primary, no operations can succeed unless you set your ReadPreference to PRIMARY_PREFERRED. See the docs here: http://mongoengine-odm.readthedocs.org/en/latest/guide/connecting.html#replicasets The reconnection process must happen once per uwsgi process. So if there is a change to your replica set, you can expect one AutoReconnect exception per uwsgi process.

Categories : Python

Have you managed to make your node nginx proxy setup on Heroku work?
This article contains instructions on setting up nginx as a proxy on Heroku, in conjunction with OpenResty, Lua, and LuaRocks. node.js isn't mentioned. It uses this buildpack. Haven't tried it myself but seems someone has got it working.

Categories : Node Js

How do I configure a Ruby Mechanize agent to work through the Charles web proxy?
A web proxy is not normally defined by just a port, but is usually a full host name. Charles is very likely installed on localhost. Therefore the following adjustment may work for you: @agent ||= Mechanize.new do |agent| agent.set_proxy("localhost", 8888) end

Categories : Ruby

How do I configure Tomcat and HAProxy to work with the WebSocket Framework Atmosphere?
Okay here is what I would do. Install the APR Connector on your Tomcat server. This will speed up the production environment. Download APR and follow the install instructions to compile it on your os. You do not need the NIO Connector anymore. Edit your server.xml: <Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol" URIEncoding="UTF-8" maxThreads="250" redirectPort="8443" /> Do not use the org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor this causes errors for me. Your HAProxy config is fine. You should also use the atmosphere-runtime-native.jar instead of the atmosphere-runtime.jar. Your errors might occur because you connect with a browser that does not support websockets to your

Categories : Tomcat

Using Ubuntu Squid as a relay with auto-configuration
Ended up doing something much more "simpler". Downloaded the PAC file to local disk than used file:///{drive}:/{folder}/{pacfile} as an automatic configuration script location. Proceeded with adding blocked domain to direct access hosts.

Categories : Ubuntu

Configure Github pull request plugin to work reliably on several builds
The solution to this is to configure your GitHub PR builder build as a jenkins build-flow Job: build("unit-tests"); parallel ( // osx and windows will be scheduled in parallel. { build("osx-integration") }, { build("windows-integration") }, ) https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin This way the build-flow job will stay "running" until all builds are finished and fail the entire build if any sub-build fails.

Categories : Github

How configure Apache HTTP so URL will work without context for three Tomcat 7 Java apps
Name your web applications context1, context2, and context3 in each Tomcat instance and change your httpd.conf mappings to these: JkMount /context1|/* worker1 JkMount /context2|/* worker2 JkMount /context3|/* worker3 If you want users to be able to go to / instead of /context1 then you are going to have to use different VirtualHosts on Apache httpd and configure each webapp to be the ROOT webapp on each Tomcat instance.

Categories : Apache

C#, Metro, Stream Socket, SSL Untrusted Host, Squid
I did it by modifying the Control of the StreamSocket that way : _streamSocket.Control.IgnorableServerCertificateErrors.Add(ChainValidationResult.Untrusted); _streamSocket.Control.IgnorableServerCertificateErrors.Add(ChainValidationResult.InvalidName); ChainValidationResult contains multiple options, choose the one best suited for you.

Categories : C#

The squid's rule "undocumentedapi" doesn't exclude some getter methods
Answered on the user mailing-list. See http://sonar.15.x6.nabble.com/The-rule-undocumentedapi-doesn-t-exclude-some-getter-methods-td5015058.html

Categories : Java

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

Any way configure to configure visual studio mvc build views release mode
Are you specifically setting something to compile the views like the Razor Generator? (http://razorgenerator.codeplex.com/) If not views in MVC are not compiled.

Categories : Asp Net Mvc

TFS 2012 Configure Features Error - Unable to configure Planning Tools
Try this: Rename your User Story to "Product Backlog Item". Set the Initial State of you "Bug" to "Active". Try the Upgrade Rename your User Story Type back to "User Story". Remove the "Active" Initial State. Export your Common Process Config and add in your "Proposed" State into the Bug Configuration (see below). Import your Common Process Config. Example BugWorkItems <BugWorkItems category="Microsoft.BugCategory"> <States> <State type="Proposed" value="Proposed" /> <!-- more --> </States> </BugWorkItems>

Categories : Tfs

Sonar Squid Error while sonar analysis with jenkins job through maven
This error means that the ".java" source files are not located in a correct folder. If your project is a Maven project, chances are that the ".java" source files are located in <project>/src/main/java - like the convention suggests it. However, from what I see in your POM, you have set the source folder to be "src" instead of "src/main/java". This is why you get this error.

Categories : Maven



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