L
L
linux20002011-12-23 20:48:04
Nginx
linux2000, 2011-12-23 20:48:04

nginx and apache

Set up LAMP server, nginx as front, apache as backend. Did you set the settings in the nginx config? so that static content: jpg, gif, etc. he gave himself without using apache (in general, the standard configuration). Everything successfully earned, sites are displayed.

But decided to check? But is it really nginx that takes all the work of returning statics. Stopped apache and tried to get an image from the server using only nginx. But one nginx without apache gave an error instead of a picture. It turns out that my nginx config is not configured correctly? Or without apache, nginx cannot give statics?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Z
Zelgadis, 2011-12-23
@Zelgadis

“Did you set the settings in the nginx config?” What a subtle request of telepaths ...

S
Sergey, 2011-12-23
Protko @Fesor

Looks like it's set up wrong.

V
Vlad Zhivotnev, 2011-12-23
@inkvizitor68sl

It's very easy to check. Pull a specific link with a curl - it will send you headers, there will be a name of the server.
[email protected]:~$ curl debian.pro/favicon.ico 2>/dev/null | egrep '(apache|nginx)' -s


nginx/0.7.67

R
ReaderMan, 2012-01-02
@ReaderMan

Make a request to a non-existent HTML page
Get:
Not Found
The requested URL /test.html was not found on this server.
Apache/2.2.16 (Debian) Server at 192.168.1.108 Port 80
And if for a non-existent document, pdf for example
Get:
404 Not Found
nginx/0.7.67

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question