Questions tagged [server]
A server is a running instance of a software application capable of accepting requests from a client and giving responses accordingly.
                                	
	server
    
                            
                        
                    
            25,323
            questions
        
        
            1286
            votes
        
        
            34
            answers
        
        
            1.4m
            views
        
    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).
...
            
        
       
    
            1069
            votes
        
        
            64
            answers
        
        
            1.1m
            views
        
    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.
            
        
       
    
            661
            votes
        
        
            31
            answers
        
        
            848k
            views
        
    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, ...
            
        
       
    
            650
            votes
        
        
            6
            answers
        
        
            187k
            views
        
    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 = ...
            
        
       
    
            519
            votes
        
        
            32
            answers
        
        
            911k
            views
        
    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 ...
            
        
       
    
            315
            votes
        
        
            26
            answers
        
        
            511k
            views
        
    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 ...
            
        
       
    
            310
            votes
        
        
            20
            answers
        
        
            381k
            views
        
    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:...
            
        
       
    
            254
            votes
        
        
            16
            answers
        
        
            478k
            views
        
    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?
            
        
       
    
            237
            votes
        
        
            8
            answers
        
        
            253k
            views
        
    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
...
            
        
       
    
            190
            votes
        
        
            32
            answers
        
        
            558k
            views
        
    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; ...
            
        
       
    
            184
            votes
        
        
            17
            answers
        
        
            627k
            views
        
    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 ...
            
        
       
    
            141
            votes
        
        
            16
            answers
        
        
            172k
            views
        
    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 ...
            
        
       
    
            129
            votes
        
        
            2
            answers
        
        
            154k
            views
        
    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,...
            
        
       
    
            120
            votes
        
        
            3
            answers
        
        
            78k
            views
        
    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 ...
            
        
       
    
            109
            votes
        
        
            4
            answers
        
        
            73k
            views
        
    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 ...
            
        
       
    
            107
            votes
        
        
            2
            answers
        
        
            218k
            views
        
    Golang read request body multiple times [duplicate]
                I am writing my own logginMiddleware. Basically, I need to log body of the request and the response. The problem that I faced is that when I read body, it becomes empty and I cannot read it twice. 
I ...
            
        
       
    
            107
            votes
        
        
            6
            answers
        
        
            158k
            views
        
    How can I view the complete httpd configuration?
                I'm trying to figure out what is the full complete configuration of an httpd setup.  
All the configurations files are scattered in different files (/etc/httpd/conf.d, httpd.conf, various mod configs)...
            
        
       
    
            105
            votes
        
        
            10
            answers
        
        
            69k
            views
        
    Set subdirectory as website root on Github Pages
                I'm using Github Pages to host & serve a static website.
The static website has the typical directory structure for an app:
.
├ source/
├ build/
│ └ index.html
├ .gitignore
├ config.rb
├ Gemfile
┆ ...
            
        
       
    
            103
            votes
        
        
            2
            answers
        
        
            198k
            views
        
    Systemd with multiple execStart [closed]
                Is it possible to create service with the same script started with different input parameters?
Example:
[Unit]
Description=script description
[Service]
Type=simple
ExecStart=/script.py parameters1
...
            
        
       
    
            95
            votes
        
        
            26
            answers
        
        
            796k
            views
        
    Apache is not running from XAMPP Control Panel ( Error: Apache shutdown unexpectedly. This may be due to a blocked port)
                I have installed XAMPP (xampp-win32-1.8.2-0-VC9-installer.exe) on Windows 7 successfully. But unfortunately, the following error was found during running Apache from XAMPP Control Panel: 
5:38:38 PM  ...
            
        
       
    
            87
            votes
        
        
            3
            answers
        
        
            151k
            views
        
    Where is the data directory in Redis?
                After writing some data to a redis server, I could read the data from a client.
However, how can I find the data directory on the file system?
            
        
       
    
            86
            votes
        
        
            17
            answers
        
        
            151k
            views
        
    redis-server in ubuntu14.04: Bind address already in use
                I started redis server on ubuntu by typing this on terminal: $redis-server
This results in following > http://paste.ubuntu.com/12688632/
aruns ~ $ redis-server
27851:C 05 Oct 15:16:17.955 # Warning: ...
            
        
       
    
            81
            votes
        
        
            2
            answers
        
        
            45k
            views
        
    How to install Certbot (Let's Encrypt) without interaction?
                I am writing a bash script which bootstraps the whole project infrastructure in the freshly installed server and i want to configure ssl installation with letcecrypt certbot. After I execute line:
...
            
        
       
    
            80
            votes
        
        
            2
            answers
        
        
            60k
            views
        
    What is the difference between Tomcat and TomEE, TomEE and TomEE Plus
                I want to deploy EJB ear in a server but I am really confused about choosing a server among tomcat, TomEE and TomEE Plus.
What are the differences between Tomcat and TomEE?
What are the new features ...
            
        
       
    
            73
            votes
        
        
            2
            answers
        
        
            697k
            views
        
    How do I solve the "server DNS address could not be found" error on Windows 10? [closed]
                After installing Windows 10, I am continuously getting the "server DNS address could not be found" error.
I will be able to use the Internet for 4-5 minutes, and after that for 20-25 min I will get ...
            
        
       
    
            70
            votes
        
        
            5
            answers
        
        
            53k
            views
        
    ipython server can't launch: No module named notebook.notebookapp
                I've been trying to setup an ipython server following several tutorials (since none was exactly my case). A couple days ago, I did manage to get it to the point where it was launching but then was not ...
            
        
       
    
            70
            votes
        
        
            4
            answers
        
        
            67k
            views
        
    SSL Multilevel Subdomain Wildcard
                I bought a wildcard certificate for *.example.com. Now, I have to secure *.subdomain.example.com. Is it possible to create a sub-certificate for my wildcard-certificate? 
If it is, how I can do this?
            
        
       
    
            64
            votes
        
        
            15
            answers
        
        
            30k
            views
        
    UnhandledPromiseRejectionWarning: Error: You must `await server.start()` before calling `server.applyMiddleware()` at ApolloServer
                I am trying to start my nestJs server and It keeps giving me this error:
UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware()
at ApolloServer
...
            
        
       
    
            61
            votes
        
        
            11
            answers
        
        
            158k
            views
        
    django development server, how to stop it when it run in background?
                I use a Cloud server to test my django small project, I type in manage.py runserver and then I log out my cloud server, I can visit my site normally, but when I reload my cloud server, I don't know ...
            
        
       
    
            61
            votes
        
        
            23
            answers
        
        
            352k
            views
        
    Getting the screen resolution using PHP
                I need to find the screen resolution of a users screen who visits my website?
            
        
       
    
            58
            votes
        
        
            10
            answers
        
        
            84k
            views
        
    how to disable direct access to a web site by ip address
                I have a website on a VPS.
The issue I am having is that when I enter the IP of the server, it links to the website.
Even when entering mail.domain.com, it does the same thing.
How do I disable that,...
            
        
       
    
            58
            votes
        
        
            1
            answer
        
        
            165k
            views
        
    What does "app.run(host='0.0.0.0') " mean in Flask [duplicate]
                I am reading the Flask documentation.  I was told that with app.run(host='0.0.0.0'), I could make the server publicly available. 
What does it mean ? How can I visit the server in another computer (...
            
        
       
    
            57
            votes
        
        
            15
            answers
        
        
            105k
            views
        
    Missing credentials for "PLAIN" nodemailer
                I'm trying to use nodemailer in my contact form to receive feedback and send them directly to an email. This is the form below.
<form method="post" action="/contact">
      <label for="name"&...
            
        
       
    
            57
            votes
        
        
            2
            answers
        
        
            80k
            views
        
    Golang. What to use? http.ServeFile(..) or http.FileServer(..)?
                I'm a little bit confused. Much of examples shows usage of both: http.ServeFile(..) and http.FileServer(..), but seems they have very close functionality. Also I have found no information about how to ...
            
        
       
    
            56
            votes
        
        
            15
            answers
        
        
            245k
            views
        
    Python pip raising NewConnectionError while installing libraries
                I've Python 3 running in a linux server. I need to install some libraries (obviously) so I'm trying :
pip3 install numpy
Which, is resulting in the following error:
Collecting numpy
  Retrying (...
            
        
       
    
            55
            votes
        
        
            2
            answers
        
        
            25k
            views
        
    What does binding a Rails Server to 0.0.0.0 buy you?
                I am using "www.xip.io" as a DNS wildcard for testing on different devices. I set my primary domain to my IP address. I fire up a rails server with bundle exec rails server and I go here www.<...
            
        
       
    
            53
            votes
        
        
            4
            answers
        
        
            79k
            views
        
    Start a PHP server on Mac OS X
                I am figuring out how to use PHP OpenId
I have cloned the repo to the ~/www directory. There are some examples in the php-open-id/examples directory which I wanted to run.
Specifically, I wanted to ...
            
        
       
    
            53
            votes
        
        
            4
            answers
        
        
            32k
            views
        
    Why do I need to use http.StripPrefix to access my static files?
                main.go
package main
import (
    "net/http"
)
func main() {
    http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
    http.ListenAndServe(":8080", nil)
}
...
            
        
       
    
            52
            votes
        
        
            19
            answers
        
        
            111k
            views
        
    keep getting "? Something is already running on port 3000" when I do npm start on react app
                I keep on getting "? Something is already running on port 3000" message in my terminal when I start up my react server when there is absolutely nothing running on my port 3000
What I have ...
            
        
       
    
            50
            votes
        
        
            3
            answers
        
        
            18k
            views
        
    Why does React have a server on its own?
                First of all, I know the question is badly formulated. I can't think of any thing to describe the situation as I'm a beginner.
So when on cmd we type npx create-react-app myapp, this sets up the react ...
            
        
       
    
            49
            votes
        
        
            2
            answers
        
        
            28k
            views
        
    Difference between a server with http.createServer and a server using express in node js
                What's the difference between creating a server using http module and creating a server using express framework in node js?
Thanks.
            
        
       
    
            48
            votes
        
        
            10
            answers
        
        
            61k
            views
        
    PHPmyadmin pop-up error notice keeps appearing when clicking on columns of databases
                I keep receiving a pop-up error, when clicking on columns in databases: 
  Some errors have been detected on the server, please look at the
  bottom of this window.
  
  Notice in .\libraries\...
            
        
       
    
            44
            votes
        
        
            7
            answers
        
        
            57k
            views
        
    How to run pm2 so other server users are able to access the process?
                When I start my Nodejs app with pm2, other server users are not able to access the process.
Even if I start pm2 from a custom directory (not current user's ~/, what pm2 is using by default):
HOME=/...
            
        
       
    
            43
            votes
        
        
            4
            answers
        
        
            86k
            views
        
    how to automatically restart a node server?
                We are finishing development of a project, the client is already using it but occasionally some errors occur - crashing the server.
I know I could register a service as 'upstart' script on linux, in ...
            
        
       
    
            43
            votes
        
        
            3
            answers
        
        
            30k
            views
        
    nginx map directive: why is it allowed only on http level?
                There is a very useful directive in Nginx map.
But it is possible to use it only on the http level (see docs here http://nginx.org/en/docs/http/ngx_http_map_module.html#map).
For example, I have a ...
            
        
       
    
            42
            votes
        
        
            4
            answers
        
        
            62k
            views
        
    npm run dev --host network: not exposed
                I want to expose my svelte app on LAN using the npm run dev --host command but it shows:
> [email protected] dev
> svelte-kit dev
  SvelteKit v1.0.0-next.295
  local:   http://localhost:3000
  ...
            
        
       
    
            42
            votes
        
        
            8
            answers
        
        
            71k
            views
        
    Install Anaconda on Ubuntu (or Linux) via command line
                I would like to install Anaconda on a remote server. 
The server is running Ubuntu 12.04.
I only have access to this server via SSH. 
How can I install Anaconda via the command line?
            
        
       
    
            41
            votes
        
        
            4
            answers
        
        
            20k
            views
        
    Share types between client and server
                I'm working on a project with a Node.js, Express.js & TypeScript backend (REST API) and a React, Redux & TypeScript frontend.
In the backend I have created some types for example:
models/...
            
        
       
    
            41
            votes
        
        
            2
            answers
        
        
            36k
            views
        
    Multipart HTTP response
                The goal is for a Node.js / hapi API server to respond to a browser's AJAX request with two things:
A media file (e.g. an image)
A JSON object with metadata about the file
These are two separate ...
            
        
       
    
            40
            votes
        
        
            8
            answers
        
        
            50k
            views
        
    json-server cannot access via local IP
                I'm using npm json-server from here. It used to work great for my needs: run a server on my PC and do GET requests to local IP (192.168.1.XX). I reinstalled it and now I can do requests only to ...