Questions tagged [webserver]

A software application that services requests from clients using the Hypertext Transfer Protocol.

8218 questions
84
votes
6 answers

Is it possible to get a list of files under a directory of a website? How?

Say I have a website www.example.com. Under the website directory there is a page secret.html. It can be accessed directly like www.example.com/secret.html, but there are no pages that link to it. Is it possible to discover this page, or will it…
morpheus
  • 18,676
  • 24
  • 96
  • 159
84
votes
7 answers

Running Node.js in apache?

We have an Apache Webserver installed on a machine which also serves pages using Perl. For a project I've decided to use Node.js instead of Perl/Ruby. Just wondering if it's possible to use Apache as my webserver (so it serves the pages) and use…
JackSparrow123
  • 1,360
  • 2
  • 18
  • 23
83
votes
8 answers

Is there a simple PHP development server?

When writing web apps in Python, it's brain dead easy to run a development server. Django and Google App Engine (GAE) both ship with simple servers. The main feature I'm looking for is no configuration. I want something like the GAE dev server…
mdashx
  • 1,335
  • 2
  • 10
  • 12
82
votes
3 answers

Configuring nginx to return a 404 when a URL matches a pattern

I want nginx to return a 404 code when it receives a request which matches a pattern, e.g., /test/*. How can I configure nginx to do that?
shanqn
  • 1,155
  • 2
  • 9
  • 14
82
votes
16 answers

Android - How to download a file from a webserver

In my app I am downloading a kml file from a webserver. I have set the permission for external storage and internet in my android manifest file. I am new to Android, your help is greatly appreciated. MainActivity.java package…
Iam4fun
  • 1,438
  • 3
  • 14
  • 18
79
votes
3 answers

multiple websites on nginx & sites-available

With the base install of nginx, your sites-available folder has just one file: default how does the sites-available folder work and how would I use it to host multiple (separate) websites?
Kristian
  • 21,204
  • 19
  • 101
  • 176
77
votes
2 answers

Why use Mongrel2?

I'm confused what purpose Mongrel2 serves/provides that nginx doesn't already do. (Yes, I've read the manual but I must to be too much of a noob to understand how it's fundamentally different than nginx) My current web application stack is: -…
frooyo
  • 1,863
  • 3
  • 19
  • 21
74
votes
6 answers

How do I leave Node.js server on EC2 running forever?

As you can tell by my question, I'm new to this... I built my first website, I set up my first Node.js server to serve it and then pushed everything live on EC2. I tested everything on my EC2 IP address and everything seems to be working. Now up…
Kawd
  • 4,122
  • 10
  • 37
  • 68
73
votes
2 answers

Reload Nginx configuration

I am trying to modify the Nginx config file to remove a "rewrite". Currently, I have this config file: worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; …
dev691
  • 1,034
  • 1
  • 9
  • 17
72
votes
6 answers

How to run my Angular site on mobile device that is running localhost on my windows desktop

I know from this question and answer on Super User Site running on localhost on desktop is unreachable on android device (PS: this question continues on the question in the link) that the command ng serve opens a bad configured webserver. The…
H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
70
votes
2 answers

CORS - localhost as allowed origin in production

Occasionally when troubleshooting bugs in production, it would be convenient to be able to hit our production REST server from my local dev environment. But i'm concerned that adding localhost to allowed origins would be a security risk. Searches…
Devon Sams
  • 1,324
  • 2
  • 12
  • 19
70
votes
4 answers

Semicolon as URL query separator

Although it is strongly recommended (W3C source, via Wikipedia) for web servers to support semicolon as a separator of URL query items (in addition to ampersand), it does not seem to be generally followed. For example,…
mykhal
  • 19,175
  • 11
  • 72
  • 80
70
votes
3 answers

Nginx location "not equal to" regex

How do I set a location condition in Nginx that responds to anything that isn't equal to the listed locations? I tried: location !~/(dir1|file2\.php) { rewrite ^/(.*) http://example.com/$1 permanent; } But it doesn't trigger the redirect. It…
Christiaan
  • 1,051
  • 2
  • 11
  • 20
69
votes
7 answers

Best way to rotate Apache log files

I've got an Apache server that has one access log file that is topping 600MB. This makes it really hard to search the file or parse it. What software or modules for Apache are available that will make a daily copy of my access file to make it more…
Scott Gottreu
  • 3,586
  • 4
  • 28
  • 34
69
votes
3 answers

What are the trade-offs between different methods of constructing API URLs: subdomain vs. subdirectory and versioning?

We have a web application with a domain name of example.com. Now we want to extend a part of this application as a REST API, and we are debating on the best URL pattern. We could use the URL pattern api.example.com or example.com/api. What…
Abhijith Prabhakar
  • 1,325
  • 3
  • 12
  • 24