Hot answers tagged

12

It's correct to set this directive like RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS} If it doesn't work, you may need to install and enable the module mod_headers.


4

Add this block to your NGINX config: server { listen 80; server_name here.your.ip.address; rewrite ^ http://example.com$request_uri? permanent; }


4

Here's the Nginx Conf which works for me, placed at the path /etc/nginx/conf.d/example.com.conf. server { listen 80; listen [::]:80; server_name example.com; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass "...


4

Just pass an option to do it: var io = require('socket.io')(); io.on('connection', function(client){}); io.listen(3000, { cookie: false }); See it in the docs: https://github.com/socketio/engine.io#methods-1


3

The only solution is to use HTTPS for your AJAX service that is running on example.com:port. One easy way to make that happen would be to use a reverse proxy on your main server that is already running HTTPS. You could set up a directory such as https://example.net/service to reverse proxy from http://example.com:port. Then your AJAX client would request ...


3

What you are missing is that the components of the stack are somewhat abstract concepts, so the delineations are not necessarily clean, on the server side. Web servers typically sit in front of server-side language environments, sometimes they talk on sockets or pipes, or sometimes the language interpreter runs inside the web server's process space, and ...


3

Node.js can handle certificates in multiple formats, but the most common and easiest to set up is the PEM format used by Apache, nginx, etc. It doesn't matter much what you request from NetSol, as long as it is not IIS, which uses a completely different format. The only real hangup you may run into is with the intermediate CA certificates, which NetSol has ...


3

No, it's not. Node.js and MySQL are completely different things. From http://nodejs.org: Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that ...


3

The reverse proxy should be entirely invisible to the user, so no, it should not in any way affect SEO. If, however, the (remote) server you were proxying to was slow or on a slow connection then yes, that could affect SEO, simply because it would slow everything down. But that does not seem to be the case here.


2

Just buy a bigger linode to expand my website. Double the power means that the server can handle twice as many users, right? Increasing server capacity is certainly easier. It sounds like you have a small enough server that it would be cost effective as well. Generally, I would recommend increasing your server first, then load balancing once that is no ...


2

The speed at which webservers deliver pages usually depends on how quickly they can pull the data together from where it is stored. Here are the places that data for a website is usually stored from fastest to slowest. In memory On disk In a network cache In a database So even when you are talking about static files on disk, it would be faster to have ...


2

There are quite a few reasons to do this, but I'll touch on two: scalability and availability. Scalability: You may choose to reverse proxy your web-app so you can add more than one instance of your application. For instance, if you have 1 node process running on port 5000 but are using Apache/Lighttpd/Nginx/etc to route requests from port 80 to this ...


2

The framework is: Generating the page internally for every request Using ETag headers with a content hash function to compare the generated page with the version sent before Either sending the full page, or a "Not Modified" response based on the hash comparison Because your content is database generated, the framework has to assume that it is dynamic and ...


2

DNS records alone cannot do what you want. DNS records only point host names to IP addresses (or in the case of CNAMEs to other host names). You have to configure your server to handle it correctly. One way is to issue redirects. I presume that you think that is ugly because the URL changes. Another way is to set up "virtual hosts" with different ...


2

I removed the lines below and it removed the cookie line 14 //var cookieMod = require('cookie'); line 47 //this.cookie = false !== opts.cookie ? (opts.cookie || 'io') : false; line 48 //this.cookiePath = false !== opts.cookiePath ? (opts.cookiePath || '/') : false; line 49 //this.cookieHttpOnly = false !== opts.cookieHttpOnly; line 290 - line 298 //if (...


2

You can use redbird, a Node.js reverse proxy. Your config will look something like this var proxy = require('redbird')({port: 80}); proxy.register("example1.com", "http://127.0.0.1:8001", { ssl: { letsencrypt: { email: 'john@example.com', // Domain owner/admin email production: true, // WARNING: Only use this flag when the proxy is ...


2

Those response headers you are seeing look fine. You should not expect to the X-Forwarded-Proto header in them. As you state, that header is set when the request is proxied to the back end. To see that header, you would have to have your backend code look for it and log the value. It appears that you are setting the header correctly.


1

Nothing stands out as worrisome to me in your test results. Of note is that some of your requests take well over a second to load, but that is to be expected on any very cheap shared hosting provider. Regarding the bandwidth limit, that is an internal NameCheap policy as the soft-caps for "unlimited" plans vary by hosting provider. Unless you are running a ...


1

The most common division is between the front end (the stuff that the site visitor interacts with) and the back end (all of the pieces required to assemble and deliver the actual pages). Front end developers tend to be familiar with some combination of HTML, CSS, and JavaScript. Back end developers will likely know something about systems administration (how ...


1

Well you can use two separate routes for Messi and Ronaldo and render the same template. As in selecting the players, it can be setup such that when the user selects each player it redirects to that player's route. Do comment if it's not what you want. I feel like I have not fully understood what you need.


1

When you enter the domain name without port, it defaults to 80 for http or 443 for https. If you are using different port, like you are showing in your example (3050), you still need to use it even with domain name - domain.com:3050 DNS does not map anything to specific ports. It looks like in your case the whole site is loaded in an iframe from the IP ...


1

Because your main application server is behind a proxy server, you will naturally be seeing the IP address of the proxy server, since this is effectively the "client" making the request to your application server. You need the IP address of the client that makes the request to the proxy server - the originating IP address. The only way to get this ...


1

Firstly, I recommend dropping the www from the front of subdomains, it confuses people. You can have www.foo.com if you really want, but then just potato.foo.com I am not sure about in node.js but if you are using cpanel there is a class to create subdomains. First get the PHP XMLAPI class from github then follow the examples. Here is how I use it to ...


1

You need to set-up a reverse proxy in IIS that redirects the requests to your Node.js Server and serves back the response to your users. This is as easy as 1.2.3 in IIS using the URL Rewriter module. Here you have an explanation: https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/


1

dynamically generate marketing websites for my company's brand partners. Although, I understand your question, I need to clarify this since this is usually not a common approach. Are you generating a page for each individual domain or generating a page for different section of the website? Most of the images, site layout, variable amounts of copy, etc ...


1

You'll need to run both node apps on different ports, I suggest using PM2, which is a free and popular tool. Then you'll need to route from the different domains or folder to different ports. NGINX is a very powerful tool, yet using apache is much easier to configure and will do what you need. Here's how you might want to set your routing: www.example.com:...


1

Found the answer. On an EC2 instance, ensure the following: Nginx is on, and whatever server_name you're using will allow you to access it. If your server has UFW on, then make sure incoming TCP connections are allowed (on ports 80 and 443) Lastly, go to "edit inbound rules" in your instance's security group, and allow incoming connections via 80 and 443. ...


1

Based on the first line it looks like it was expecting python 2.7 to be available. I think you probably need to install that set the env variable as it states and it should work. It's running through an alternative process to build which is saying is not nodes issue. That just means its almost definitely not npm in this instance but the project you've ...


1

There is now an installation walk-through at MediaWiki's VisualEditor on a shared host page.


1

You can serve different content to search bots but typically, if you are serving different content (or at least handling search bots differently) to human visitors, then you need to be wary of cloaking which can produce negative effects in how your site performs.


Only top voted, non community-wiki answers of a minimum length are eligible