: This article describes how to install nginx + FFmpeg for Ubuntu14041410 users. For more information about PHP tutorials, see. Install nginx
sudo apt-get install nginx
After Ubuntu is installed, the file structure is roughly as follows:
- All configuration files are under/etc/nginx, and each virtual host is already under/etc/nginx/sites-available.
- Program file in/usr/sbin/nginx
- Logs are stored in/var/log/nginx.
- The startup script nginx has been created under/etc/init. d /.
- The default virtual host directory is/var/www/nginx-default (in some versions, the default virtual host directory is/var/www, see the configuration in/etc/nginx/sites-available)
Start nginx
sudo /etc/init.d/nginx start
Then you can access http: // localhost/. everything is normal! If it cannot be accessed, do not continue. check the cause and then continue. If port 80 is occupied at startup: Starting nginx: [emerg]: bind () to 0.0.0.0: 80 failed (98: Address already in use), modify the file: /etc/nginx/sites-available/default: remove the # sign before listen. # indicates the comment in this file, change the port number 80 after listen to your own Port. you need to add a port number for access.
(If 403 error occurs after installation, it may be that the website path in the nginx configuration file is incorrect)
Modify configuration and add reverse proxy
By default, the nginx-> config-> nginx. conf file is installed in 1.4 and the reverse proxy is not valid. in win, 1.5 is used to modify this configuration file.
Finally, the/etc/nginx/sites-available/default file is modified.
Install FFmpeg 2.5.1
FFmpeg is a popular multimedia framework. when installing some players, you must rely on FFmpeg to easily implement ncode, transcoding, mux, demux, stream, filter, and play audio and video content.
The latest FFmpeg 2.5.1 version has been released. Ubuntu 14.04 and 14.10 users can install FFmpeg 2.5.1 through PPA. open the terminal and enter the following command:
Sudo add-apt-repository ppa: kirillshkrogalev/ffmpeg-next
Sudo apt-get update
Sudo apt-get install ffmpeg
Run the following command to uninstall ffmpeg:
Sudo apt-get remove ffmpeg
The above describes how to install nginx + FFmpeg (summary) for Ubuntu 1404/1410 users, including some content, and hope to help those who are interested in PHP tutorials.