Questions tagged [web-server]
Refers to the software or hardware that make up a webserver, delivering content on a private or public website.
3,302
questions
372
votes
6
answers
569k
views
What permissions should my website files/folders have on a Linux webserver?
This is a Canonical Question about File Permissions on a Linux web server.
I have a Linux web server running Apache2 that hosts several websites. Each website has its own folder in /var/www/.
/var/...
208
votes
5
answers
202k
views
Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
I have some experience using linux but none using nginx. I have been tasked with researching load-balancing options for an application server.
I have used apt-get to install nginx and all seems ...
139
votes
7
answers
261k
views
How to list Apache enabled modules?
Is there a command that list all enabled Apache modules?
125
votes
5
answers
76k
views
How do you do load testing and capacity planning for web sites?
This is a canonical question about capacity planning for web sites.
Related:
Can you help me with my capacity planning?
How do you do load testing and capacity planning for databases?
What are some ...
99
votes
3
answers
76k
views
How do high traffic sites service more than 65535 TCP connections?
If there is a limit on the number of ports one machine can have and a socket can only bind to an unused port number, how do servers experiencing extremely high amounts (more than the max port number) ...
74
votes
8
answers
267k
views
Why is the response on localhost so slow?
I am working on a tiny little PHP project for a friend of mine, and I have a WAMP environment setup for local development. I remember the days when the response from my local Apache 2.2 was immediate. ...
57
votes
10
answers
77k
views
How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port
This is a Canonical Question about DNS/Hostnames resolution to IPs/Ports
Example 1
I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to ...
53
votes
7
answers
244k
views
How do I make Apache Web Server listen on two different ports?
I'd like an Apache Web Server I have installed at home to listen on port 80 and port 8080.
I've added Listen 8080 to httpd.conf and restarted the Apache services but the server doesn't seem to be ...
53
votes
9
answers
119k
views
Why would a server not send a SYN/ACK packet in response to a SYN packet
Lately, we've become aware of a TCP connection issue that is mostly limited to mac and Linux users who browse our websites.
From the user perspective, it presents itself as a really long connection ...
48
votes
3
answers
21k
views
Why is setting Nginx as a reverse proxy a good idea?
I have a Django site running on Gunicorn with a reverse proxy through Nginx.
Isn't Nginx just an extra unnecessary overhead?
How does adding that on top of Gunicorn help?
47
votes
5
answers
98k
views
How many requests should my webserver be able to handle?
Not going into specifics on the specs since I know there is no real answer for this. But I've been doing load testing today with the ab command in apache.
And got to the number of 70 requests per ...
45
votes
2
answers
60k
views
Effects of configuring vm.overcommit_memory
My VPS web server running on CentOS 5.4 (Linux kernel 2.6.16.33-xenU) irregularly (like once a month give or take a few weeks) becomes unresponsive due to oom-killer kicking in. Monitoring of the ...
39
votes
7
answers
18k
views
How can I block hacking attempts targeting phpMyAdmin?
My website gets thousands of hits daily from different IPs trying to access:
/php-myadmin/
/myadmin/
/mysql/
...and thousands of other variations. None of these directories exist, I don't even have ...
39
votes
5
answers
153k
views
How do I access a web server on a virtualbox from the host machine [closed]
I have a windows Vista machine upon which VirtualBox is running ubuntu.
In ubuntu I am running a webserver at the address http://127.0.0.1:3000/
How do I access this address from my host machine (...
37
votes
3
answers
49k
views
When to turn TCP SACK off?
I've been looking at Linux tuning params and see some configs where SACK is turned off. Can anyone explain this?
This would be tuning for a busy web server.
36
votes
8
answers
46k
views
How to reduce memory usage on a Unix webserver
I'm currently using a Joyent Accelerator to host my webapps, and it's working fine, however I need to reduce costs so I'm downgrading my current plan and that imposes some new memory limits (256M rss, ...
35
votes
7
answers
88k
views
getpwnam("www") failed in /etc/nginx/nginx.conf
I copied the nginx.conf sample onto my ubuntu 12.04 box (I don't know where to put the other conf files. I'm an nginx noob). When I try to start nginx I get the following error:
abe-lens-laptop@abe:/...
35
votes
1
answer
45k
views
How to disable http basic auth in nginx for a specific ip range?
I'm developing an application with facebook login. So far it's not public and is protected by http basic auth in nginx. Is it possible to disable http auth for facebook's ip range so that we can have ...
35
votes
2
answers
21k
views
Any disadvantage to short DNS TTL? [closed]
Any disadvantage to short DNS TTL?
34
votes
7
answers
35k
views
How to best defend against a "slowloris" DOS attack against an Apache web server?
Recently a script called "slowloris" has gained attention. The basic concept of what slowloris does is not a new attack but given the recent attention I have seen a small increase in attacks against ...
33
votes
7
answers
15k
views
Why is Nginx so fast?
How does a site like rambler serve dynamic content so fast? Even faster than Yahoo (which has a server in my country- SE Asia; rambler does not).
Is this purely Nginx’s capability? Where should I ...
32
votes
2
answers
21k
views
Web gardens... are they good or bad or what?
Are there any downsides to giving Application Pools multiple Worker Processes in IIS? They seem really easy to enable and (almost) everything I’ve read seems to suggest they’re good... so why doesn’t ...
31
votes
5
answers
3k
views
Linux hardening - web servers
What are your checklist/routine when setting up a Linux web server?
What do you recommend to achieve maximum security?
Is there any preferred way to perform repeated maintenance?
31
votes
8
answers
3k
views
Securing PHP webservers
PHP applications have a reputation for higher than average security problems. What configuration techniques do you use for making sure the application is secure as possible?
I'm looking for ideas ...
28
votes
4
answers
140k
views
How do I disable tomcat caching? I'm having weird static file problems
How do I prevent tomcat from caching? I have css and basic html files that I load and use via ajax, and unless I restart tomcat, the changes do not seem to reflect. Different machines, different ...
28
votes
6
answers
175k
views
Nginx startup fails ssl no such file or directory
Here is the error I'm getting:
Reloading nginx configuration: nginx: [emerg]
SSL_CTX_use_certificate_chain_file("/path/to/cert.pem") failed (SSL:
error:02001002:system library:fopen:No such ...
27
votes
3
answers
15k
views
Why are NginX and Lighttpd not affected by Slowloris?
I am investigating the vulnerability to Slowloris and I think I understand how and why this sort of attack works.
What I don't understand is why Lighttpd and NginX are not affected (according to the ...
27
votes
11
answers
379k
views
How can I find out if a port is opened or not?
I have installed Apache server on my Windows 7 computer. I was able to display the default index.php by typing http://localhost/ in the address line of my browser.
However, I am still unable to see ...
26
votes
4
answers
7k
views
Is it reasonable to use NFS on a production web server?
Can NFS be reasonably used on production servers as a means of connecting a compute server to a storage server, assuming the connection is over a LAN 1Gbe or 10Gbe connection?
There's obviously some ...
26
votes
6
answers
7k
views
What are the advantages of putting secret values of a website as environment variables?
The devops guidelines at https://12factor.net/config suggest to put website secrets (database passwords, api keys, etc.) into environment variables. What advantages does that have instead of using ...
26
votes
1
answer
2k
views
What are the basics of running a Web Server?
This is a proposed Canonical Question about Beginning Web Server Administration.
Assuming that you are a beginning SysAd, are new to WebOps, or a small team with little or no experienced Web Server ...
25
votes
8
answers
23k
views
Should I completely turn off swap for linux webserver?
Recently my friend told me that it is a good idea to turn off swap on linux webservers with enough memory. My server has 12 GB and currently uses 4GB (not counting cache and buffers) under peak load.
...
25
votes
3
answers
21k
views
nginx logging to access.log.1 instead of access.log, logrotate failing?
I have an nginx instance that is set to log access to /var/log/nginx/access.log and errors to /var/log/nginx/errors.log, but as soon as logrotate runs each week, the file gets moves to *.log.1 and the ...
25
votes
2
answers
75k
views
What kind of server do I need to handle 10 million requests and mySQL queries a day? [closed]
I'm a newbie of server administration and I'm looking for a powerful hosting service to host my new website. This website is basically a back-end of an mobile online game, and it will:
handle up to ...
24
votes
13
answers
5k
views
Server Hosting from your House - $200 to $300 per month range [closed]
I'm a developer lacking some infrastructure knowledge. What is the fattest pipe I can get to my house in the $200 to $300 range? I'd like to host a few servers at my house. Then if my company gets ...
23
votes
3
answers
70k
views
Nginx $document_root$fastcgi_script_name vs $request_filename
I can't notice any difference if in my config file I set
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Or:
fastcgi_param SCRIPT_FILENAME $request_filename;
What do ...
23
votes
5
answers
28k
views
Dropbox on linux server - how to include/exclude folders?
Using the Dropbox GUI, it's possible to controll specifically what folders to be synced. Can this somehow be done from the command-line too?
Background: I'm trying out the solutions for installing ...
23
votes
2
answers
40k
views
why do nginx process run with user nobody
I was trying to setup nginx to run with one of my rails apps, when having a look at output for ps -e | grep nginx , I realised nginx worker processes run with user nobody.
Is there a reason why they ...
23
votes
2
answers
38k
views
number of nginx worker processes
I'm setting up nginx to serve a Drupal install, and I seem to find conflicting information on the nginx worker processes setting. One site says you need two, one says you need five, one says one per ...
22
votes
6
answers
31k
views
How is session stickiness achieved across multiple web servers?
How many web servers does StackOverflow/ServerFault have?
If the answer is 'more than one', then is does it achieve Session Stickiness while DNS polling?
21
votes
6
answers
132k
views
How can I see what version of SSL a web server is currently using?
I believe I have disabled SSL 2.0 on my web server (Windows Server 2003). To make sure that it is now using SSL 3.0, how can I check this?
What is the correct way to disable 2.0 and enable 3.0 on a ...
21
votes
1
answer
3k
views
Recommended Nginx + WSGI Configurations
Please explain pros/cons when using the different Nginx WSGI interfaces? Please explain in detail what differentiates each configuration? Which configuration should scale the best?
If relevant, what ...
20
votes
2
answers
13k
views
IIS 7.5 optimizations for a site serving only static content
I'm looking to setup a cookie-free domain intended to serve static content for a web application, similar to the http://sstatic.net/ site that the stack exchange sites use.
My question is, what ...
20
votes
3
answers
76k
views
How to set up port forwarding on Amazon EC2
I have a web application running on Amazon EC2. It listens on port 9898.
I can access it by entering the ip address and port number.
e.g 1.2.3.4:9898
However, what I'd really like to be able to do ...
18
votes
4
answers
40k
views
Why does IIS refuse to serve ASP.NET content?
My Windows Server 2003 Std server refuses to server ASP.NET content. It serves regular html just fine but anything .net, even a one line html file with an ASPX extention fails silently.
Things I've ...
18
votes
2
answers
2k
views
How does a web server know which key pair to use for SSL decryption?
It is my understanding that when Apache receives a request to one of the TCP ports it is listening on (e.g. 80, 443), it will decide which host is being requested by looking at the HTTP header Host. ...
18
votes
2
answers
34k
views
How do I configure the default virtual host return a 404 header in apache?
I know that similar questions have been asked, but the available answers are not very clear, so please bear with me.
After setting up a few <VirtualHost>s in apache, I'd like to configure the ...
17
votes
5
answers
6k
views
What are the "to-do" on protecting Windows server facing the web?
I currently begin to deploy Windows servers facing the web.
And I would like to know what are you way of protecting your servers ? What softwares are you using ?
On Linux, i'm using Fail2ban to ...
17
votes
2
answers
43k
views
How to run php with SimpleHTTPServer?
I just found this awesome tip in the Apple SE:
Start a quick webserver from any directory:
python -m SimpleHTTPServer 8000
Is there a way to have this parse php scripts, or is this for html-only ...
17
votes
6
answers
7k
views
How to share assets between multiple web servers?
I have multiple Linux web servers attached to a load balancer, and I like to share assets (such as pictures, videos, and other stuff) between these servers. What is the best way to do this?
...