Questions tagged [server]

A server is a running instance of a software application capable of accepting requests from a client and giving responses accordingly.

A server is a running instance of an application (Software) capable of accepting requests from the client and giving responses accordingly.

Servers can run on any computer including dedicated computers, which individually are also often referred to as "the server".

In many cases, a computer can provide several services and have several servers running. The advantage of running servers on a dedicated computer is security. For this reason most of the servers are daemon processes and designed by the designers in such a way that they can be run on specific computer(s).

There are various categories of servers. Please refer to this Wikipedia page to learn more about the subcategories of servers.

25074 questions
1274
votes
33 answers

Using Node.js as a simple web server

I want to run a very simple HTTP server. Every GET request to example.com should get index.html served to it but as a regular HTML page (i.e., same experience as when you read normal web pages). Using the code below, I can read the content of…
idophir
  • 14,451
  • 5
  • 24
  • 21
1046
votes
62 answers

How to configure port for a Spring Boot application

How do I configure the TCP/IP port listened on by a Spring Boot application, so it does not use the default port of 8080.
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
651
votes
30 answers

How do I run a node.js app as a background service?

Since this post has gotten a lot of attention over the years, I've listed the top solutions per platform at the bottom of this post. Original post: I want my node.js server to run in the background, i.e.: when I close my terminal I want my server…
Peter Kruithof
  • 10,584
  • 6
  • 29
  • 42
642
votes
6 answers

Express.js - app.listen vs server.listen

This may be a very basic question but I simply don't get it. What is the difference between creating an app using Express.js and starting the app listening on port 1234, for example: var express = require('express'); var app =…
Tamas
  • 10,953
  • 13
  • 47
  • 77
503
votes
32 answers

Apache2: 'AH01630: client denied by server configuration'

I get this error when trying to access localhost via a browser. AH01630: client denied by server configuration I checked my site folder permissions using: sudo chmod 777 -R * Here is my configuration file: ServerAdmin…
Hazem Hagrass
  • 9,329
  • 10
  • 32
  • 54
309
votes
25 answers

How to clear the cache of nginx?

I use nginx to as the front server, I have modified the CSS files, but nginx is still serving the old ones. I have tried to restart nginx, to no success and I have Googled, but not found a valid way to clear it. Some articles say we can just delete…
Freewind
  • 193,756
  • 157
  • 432
  • 708
305
votes
20 answers

How to make a node.js application run permanently?

On a Debian server, I installed Node.js. I understand how to launch an app from putty with this command line: node /srv/www/MyUserAccount/server/server.js and get to it on the address 50.51.52.53:8080 (IP and port). But as soon as I close putty,…
Sam
  • 3,479
  • 4
  • 17
  • 17
248
votes
16 answers

PHP server on local machine?

I'm trying to build a PHP site and I'm wanting to test my PHP files without uploading them to my host. Basically testing them on my own machine before I upload them. How do I do that?
Kozy
  • 2,691
  • 3
  • 18
  • 11
226
votes
8 answers

Have nginx access_log and error_log log to STDOUT and STDERR of master process

Is there a way to have the master process log to STDOUT STDERR instead of to a file? It seems that you can only pass a filepath to the access_log directive: access_log /var/log/nginx/access.log And the same goes for error_log: error_log…
quinn
  • 5,508
  • 10
  • 34
  • 54
178
votes
32 answers

nginx.service failed because the control process exited

nginx.service failed because the control process exited $ systemctl status nginx.service nginx.service - Startup script for nginx service Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: failed…
daliborsb
  • 1,781
  • 2
  • 10
  • 4
175
votes
17 answers

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'

I just want to install socket.io to my project which is located on 3.chat folder. But when I run following command it shows following Warnings.And its not created a node_modules directory inside my project folder. How to fix…
user8109089
129
votes
14 answers

Docker-compose up : Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))

I am trying to do the docker-compose up command in my terminal. First I navigate to the file directory where I find a docker-compose.yaml. Then I write the command. The Server is on Port 80. I get the following error: Traceback (most recent call…
blackSwan566
  • 1,421
  • 2
  • 6
  • 10
120
votes
3 answers

There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)

Why am i getting this error? shibly@mybox:~/blog$ rails server /home/shibly/.gem/ruby/2.2.4/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'.…
cola
  • 12,198
  • 36
  • 105
  • 165
114
votes
2 answers

How to measure server response time for Python requests POST-request

I create POST requests with requests as follows, with a specified timeout threshold: response = requests.post(url, data=post_fields, timeout=timeout) However, to determine a "good" threshold, I need to benchmark the server response times. How do I…
Shuzheng
  • 11,288
  • 20
  • 88
  • 186
108
votes
4 answers

What exactly is Werkzeug?

From the official documentation: Werkzeug is a WSGI utility library for Python. However, when I run my Flask web application, I notice that the response header from the server contains: HTTP/1.0 200 OK Content-Type: text/html;…
jinglei
  • 3,269
  • 11
  • 27
  • 46
1
2 3
99 100