Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Perfect, tutorial, got almost everything working.
I just needed to change on the nginx configuration the php part:
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
to
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
Otherwise I was getting a blank page when I tried to access a php file with nginx
Good Article! Thanks for that, however, I would love to see this for CentOS7, ideally inline with some basic but still real world examples and recommendations about tweaking performance with varnish and/or page speed, improve security in this setup (do I still should use mod-security or do I need to focus on securing nginx, if so how,…
I am aware that this quickly could become a full-time job writing such articles, so please treat this as a “wish” and not as a complaint.
Nice tutorial :)
I have question, I ll buy server for prestashop store.
Nginx standalone OR Apache + Nginx (reverse proxy) ?
I prefer nginx standalone less configuration but I don’t know if the combo apache+nginx is really the best ?
uder the fastcgi.conf Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
I could not find /usr/lib/cgi-bin/php5-fcgi. Is it a self created folder ?
most open source php cms required mod_rewrite enabled to work properly.
Should I have to both, enable the apache mod_rewrite module and add url rewrite rules on the nginx reserve proxy conf ?
I found that, with the same php website, fastcgi + php5-fpm is not much responsive than a mod_php
NEAT!!! writeup. And bonus points on rpaf. Yet I think (maybe I’m blind) you somehow missed to make a point about the benfits a reverseproxy brings.
Hi Jesin,
I have ubuntu 12.04 and I try the first step with Apache but at this step : “To confirm the sites are working, open http://example1.com:8080 and http://example2.com:8080 in your browser and verify they’re displaying their index.html files.”
both of them , loading to /var/www/index.html at same page, it looks like the vhost doens’t work before these changes they were working . and not /var/www/example1/index.php or /var/www/example2/index.php
cat 000-default
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
cat example1.com
<VirtualHost *:*>
ServerName example1.com
ServerAlias www.example1.com
DocumentRoot /var/www/example1/
<Directory /var/www/example1/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
#Order allow,deny
# allow from all
</Directory>
cat example2.com
<VirtualHost *:*>
ServerName example2.com
ServerAlias www.example2.com
DocumentRoot /var/www/example2
<Directory /var/www/example2/>
# Options Indexes FollowSymLinks MultiViews
AllowOverride all
# Order allow,deny
# allow from all
</Directory>
Hi
thanks for your answer, I tried the first option
and when I restart apache2 says:
[warn] NameVirtualHost *:80 has no VirtualHosts
/etc/apache2/ports.conf
NameVirtualHost *:80
Listen 8080
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 9742/apache2
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 885/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1107/postgres
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 8771/php-fpm.conf)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1074/mysqld
tcp6 0 0 :::22 :::* LISTEN 885/sshd
This comment has been deleted