Questions tagged [webserver]

A web server is a program that responds to network requests over the HTTP or HTTPS protocol.

A web server is a program that responds to network requests over the http or https protocol.

Use this tag for questions about web servers in general. For questions about a specific web server application, use the application-specific tag instead: , , , …

Do not use this tag merely because the computer in the question happens to be a web server, only if serving web content is directly relevant to the question.

667 questions
558
votes
8 answers

How to know what program is listening on a given port?

I suspect a program is listening on port 8000 on my machine. When I run the following command, I get this error: > python -m SimpleHTTPServer # Lots of python error socket.error: [Errno 98] Address already in use If I use another port (8000 is the…
yansal
  • 5,683
273
votes
14 answers

How do I copy files that need root access with scp?

I have an Ubuntu server to which I am connecting using SSH. I need to upload files from my machine into /var/www/ on the server, the files in /var/www/ are owned by root. Using PuTTY, after I log in, I have to type sudo su and my password first in…
198
votes
8 answers

How to avoid using sudo when working in /var/www?

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.
TaylorOtwell
  • 2,115
173
votes
10 answers

How to easily start a webserver in any folder?

I'm looking for a relatively painless way to launch a web server with document root in any folder I specify (or better yet, where I'm launching). I often try out new things like JS frameworks or so in a new folder somewhere…
166
votes
8 answers

Whats the simplest way to edit and add files to "/var/www"?

Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www I gave myself administrative privileges in Ubuntu but it still doesn't allow copies.
k_graham
  • 1,761
127
votes
2 answers

Creating a symlink from one folder to another with different names?

I have two folders, one of which is my webserver root. I want to link it to my project folder so that I can keep things up-to-date with Git. If I try to do this: ln -s /home/user/project /var/www/html The system creates a folder called project…
user991710
  • 1,383
102
votes
2 answers

Can't find httpd.conf

I have installed Ubuntu 14.04 on a laptop and installed apache 2 (version 2.4.7) and PHP 5. I cannot find httpd.conf. I need to change it because when I try to open a .php page I see a download box. How should I proceed?
fosslinux
  • 3,881
96
votes
2 answers

What is the www-data user?

I'm working through How To Serve Django Applications with uWSGI and Nginx on Ubuntu 16.04. At the end of the "Create a systemd Unit File for uWSGI" in the article they discuss the www-data user. What is this and why is it important?
user1592380
  • 1,905
74
votes
7 answers

How do I set up the simplest HTTP local server?

I use the R Studio IDE to do many things, one of which is to serve local websites utilizing the blogdown package which is a fork of hugo. I write the code in R Studio and preview the site utilizing the blogdown::serve_site() command. This is the…
Display name
  • 2,331
69
votes
4 answers

Permissions problems with /var/www/html and my own home directory for a website document root

I'm trying to not give 777 permission in my /var/www/html folder, but I want to edit my files without sudo. So I thought to create a symlink of a folder in my home directory within /var/www/html. I created it using: sudo ln -sT…
63
votes
9 answers

Nginx installation error in Ubuntu 16.04

:~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full* Reading package lists... Done Building dependency tree Reading state information... Done After this operation, 5,579 kB of additional disk space will be used. Do you want…
Mohit
  • 749
48
votes
2 answers

How do I access Ubuntu server running in VirtualBox from outside

I have installed Ubuntu Server 12.04 LTS on my laptop via VirtualBox. I have installed LAMP, OpenSSH, Mail server. As I logged in, I ran ifconfig. It gave me the inet address as 192.168.0.3. So, this should be the address through which I should be…
Chins
  • 483
42
votes
9 answers

Having trouble installing and removing MySQL in Ubuntu

I have trouble in installing or removing the partly installed mysql-server-5.6 in ubuntu15.04. The error I am getting was $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information...…
37
votes
4 answers

Port seems to be open, but connection refused

I am trying to open port 3000 on Ubuntu 12.04, cause I have a web server listening there. I'm a bit out of my confort zone here, and spent many hours trying to solve the problem without success. Port seems to be open in the firewall : $> sudo ufw…
sebpiq
  • 585
36
votes
4 answers

Start MySQL on Startup

I installed MySQL, and changed the configuration so the databases are stored on a separate hard drive. In the process MySQL has stopped starting up automatically. When I start the computer, I need to run the command: sudo service mysql start to get…
1
2 3
44 45