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: (Apache 1.x or 2.x), , , …

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.

641 questions
521
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,313
  • 3
  • 13
  • 5
241
votes
13 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…
Dimitris Sapikas
  • 2,545
  • 2
  • 15
  • 9
194
votes
7 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,075
  • 3
  • 13
  • 6
166
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…
Alexander Rechsteiner
  • 2,192
  • 2
  • 14
  • 19
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
  • 3
  • 11
  • 3
121
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,323
  • 2
  • 9
  • 6
100
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,771
  • 4
  • 28
  • 46
92
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,833
  • 5
  • 26
  • 31
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
  • 2
  • 7
  • 11
62
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,121
  • 5
  • 22
  • 33
60
votes
3 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…
André Carvalho
  • 779
  • 1
  • 6
  • 11
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
  • 1
  • 4
  • 4
40
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...…
Shameerariff
  • 717
  • 1
  • 8
  • 18
35
votes
3 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…
Kohjah Breese
  • 2,701
  • 10
  • 24
  • 32
34
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
  • 555
  • 2
  • 6
  • 10
1
2 3
42 43