Nginx and PHP installation and configuration three nginx configuration files

不言
Release: 2023-03-23 19:28:02
Original
2767 people have browsed it

The content shared with you in this article is about the installation and configuration of Nginx and PHP. The configuration file of nginx has a certain reference value. Friends in need can refer to it

1. Open the configuration file: /usr/local/nginx-1.8.0/conf/nginx.conf

here root is the directory pointed to by the code

server_name is the domain name

location/ indicates matching All url perform post-matching operations. Here is a rewrite:

if (!-e $request_filename){

##                                                                                                                                                                                                               . #       

Thisrewrite

means that it will automatically match the url that matches the regular rules here. Adding index.php helps our url to automatically add index.php## The role of # shortens our url access length

Related recommendations:


##Nginx and PHP installation and configuration - Compile and install nginx-1.8.0


Nginx and php installation and configuration 2 Installation and configuration php-fpm

The above is the detailed content of Nginx and PHP installation and configuration three nginx configuration files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template