If your site is http://ningyuqiao.blog.51cto.com/site is built with Wordpres, you only need to add in the Nginx configuration file:location/{if (-f $request _filename/index.html) { rewrite ( . *) $1/index.htmlbreak;}if (-f $request _ filename/index.php) { rewrite (. *) $1/index.php;}if (!-f$ Request_filename) { rewrite (. *) /index.php;} } If your site is http://ningyuqiao.blog.51cto.com/blog/ site is built with Wordpres, then the code needs to
-http_stub_status_module--with-http_flv_module--with-http_gzip _static_module--with-http_random_index_module--with-http_secure_link_module--with-mail--with-ipv6-- with-openssl=objs.msvc8/lib/openssl-0.9.8r--with-openssl-opt=enable-tlsext--with-http_ssl_module--with-mail_ Ssl_moduleNote: v simply displays the version information, v not only displays the version information, but also displays the configuration parameter information.6. Test or load the specified configuration file:Test configuratio
Nginx CentOS Service boot Setup
Create a service file
Taking Nginx as an example
Vim/lib/systemd/system/nginx.service
Insert content in Nginx.service
[Unit]
Description=nginx
after=network.target
[service]
type=forking
execstart= Services startup command
execreload= Service restart command
execstop= S
##flaskapp name, which is our myapp.pycallable=apptouch-reload =/data/wwwroot/pidfile=/var/run/uwsgi.pid Daemonize=/usr/local/nginx/logs/uwsgi.loggevent=100 ## join NBSP;GEVENTNBSP;=NBSP;100NBSP, non-blocking mode(2) Configure cat/data/wwwroot/myapp.py again# # Add the following two lines to the file header from gevent import Monkeymonkey.patch_all () from flask import Flaskapp = Flask (__name__) @app. Route ('/') def Hello_world (): Return ' Hello w
[program:anuoapc]command=dotnet AnuoApc.Web.dll; Command directory=/root/aspnetcore/anuoapc/to run the program; The directory autorestart=true the command execution; If the program quits unexpectedly automatically restarts the Stderr_logfile=/var/log/anuoapc.err.log; Error log file Stdout_logfile=/var/log/anuoapc.out.log; Output log file environment=aspnetcore_environment=production; Process environment variable User=root; The user identity of the process execution stopsignal=int6. Copy the fil
example, if you create a web app and deploy it to Tomcat (multi-application), the default rule is to add a prefix to the project name in the URI to access it. For example, we assume that the project is named shopping, giving it a separate domain name: shopping.website.com. Then the default URL needs shopping.website.com/shopping to be OK, now it needs to be set to shopping.website.com. How to use Nginx configuration, to achieve our goal?
has been marked on it. 6. Enter (/usr/local/nginx/sbin) operation./ngnix 7. Can see the port occupancy, 80,1935 is not listeningNetstat-ltn 8. More Tests 1) send the rtmp stream to the serverRtmp://ip/myapp/testMyApp is set in ngnix.conf application, and stream is test is custom.2) Receive HLS StreamHttp://ip/hls/test.m3u8HLS is the location within the HTTP settings, access to the Linux (/tmp/hls), test is the above rtmp test, if the above is haha,
Php environment setup-WNMP (Win7 + NGINX + MYSQL + PHP) [introduction]
The php development environment should be the same as breathing for every phper, and should not be very difficult. Next, I will teach you how to build a php environment, which is also my own summary. I hope to improve it with you. (I hope you will not share it with others. do not hide it privately)
[Preparations]
At the beginni
Recently many people are more concerned about the application and setup of SSL certificate, Spring Brother technology blog recently also introduced some of the domestic free SSL certificate application process and more commonly used VPS site environment package How to install the configuration SSL certificate. Want a friend who needs to be able to successfully install an SSL certificate for their site. Here Chun brother for everyone to share several
1. Environment initialization1) Install GCC software suite:: Yum install gcc otherwise error configure:error:no acceptable C compiler found in $PATH2) Install Unzip: Yum install-y unzip zip otherwise will error Unzip:command not found3) Install the C + + compilation environment: Yum Groupinstall "Development Tools" because later pcre need to be compiled in C + +. Note (Debian system uses command apt-get, corresponding toolkit for build-essential, command usage: Apt-get install build-essential)4)
zlib-devel OpenSSL openssl-devel pcre pcre-develStep three: Enter the unzip directory./configure--with-http_ssl_moduleFourth step: Make make install You can refer to the article (http://www.cnblogs.com/skynet/p/4146083.html)3.2Nginx responsible for balanced configuration 3.2.1 Find the installation path of Nginx (default):/usr/local/nginx 3.2.2 Modify the configuration file conf/nginx.conf #设定负载均衡的服务器列表
The Setup program starts by adding the program's startup script to the/ETC/INIT.D directory, or writing the startup path to the/etc/rc.d/rc.local file.set MySQL boot upCp/usr/local/mysql/support-files/mysql.server /etc/init.d/mysql --add MySQL chkconfig MySQL onset Fdfs_tracker boot upcp/usr/local/src/fastdfs/init.d/fdfs_trackerd/etc/init.d/--add Fdfs_trackerdchkconfig fdfs_ Trackerd onset fdfs_storafed boot upcp/usr/local/src/fastdfs/init.d/fd
-end uses the UCS network management interface and the backend uses PHP. First, we must ensure that the environment is available. so we first set up the integrated development environment studyphp to improve development efficiency.
Gains:
1. I learned how to develop sublime text3 and quickly used hotkey for efficient development (ctrl + P ctrl + shift + F; ctrl + D edit multiple identical places; ctrl +/and ctrl + shift +/comments)
2. error redirection in
Centos + nginx + uwsgi + Python multi-site environment setup, centosng.pdf
Preface
The first project of the new company, the server end intends to use python as a restful api. Therefore, we need to build the nginx + fastcgi + python Development Environment on Centos. However, many comments on the Internet that uwsgi has many advantages over fastcgi. We recommend
Tags: size start load problem Linux technology share nbsp CentOS NetworkFirst install the Linux system, I use the virtual machine installation to do the example, first to download Vitualbox, this is an open-source virtual machine software, https://www.virtualbox.org official website address. or vmware,www.vmware.com, but the software is charged. And, of course, to download a Linux image, I downloaded the CentOS 7 system, Https://www.centos.org/download After downloading the virtual machine, I us
:\Project\Python\web"; Index index.html index.htm; Include Fastcgi_params; Fastcgi_param script_filename $fastcgi _script_name; Fastcgi_param path_info $fastcgi _script_name; Fastcgi_pass 127.0.0.1:8008; }} Use the command line when you are finished setting upNginx–s Stop Stop ServiceNginx–t test configuration file for errorsNginx Start-up serviceThen visit localhost, which will show the index.html under pyweb/www/(write a Hel
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.