Nginx Agent Local Folder (Windows Environment)

Installation environment:

win10

nginx-1.17.2

Steps: strong>

1. Open nginx.conf

Path: \nginx-1.17.2\conf\nginx.conf

Second, edit

Configure cross-domain and proxy folder path

share picture

3. Start nginx

Start in the nginx folder path cmd (check nginx version: nginx -v)

share picture

Four. Verification

Enter localhost for verification in the browser

share picture

Five. Questions

1. If nginx.conf is modified, it has been activated For nginx, after the modification is completed, you need to read the configuration again and restart the service.

Re-read the file: nginx -s reload

Restart the service: nginx -s reopen

share picture

2. During the learning process, I encountered a 403 forbidden situation.

On the Internet, it is said that it is a permission problem. You can change user nobody to user root, but they are all solutions under linux. I am in a win10 environment. I tried to change various users, but there was no response.

Share a picture

During the research process, it was found that each run Command: start nginx will start two nginx.exe processes. I didn’t know at the beginning, I started more than a dozen processes (normally there should be only two), and finally killed them all, reconfigured them again, and no more 403s were reported. (I don’t know if this is the reason.)

Share a picture

Six. Shutdown

Because nginx is started through the command line, it will not be closed when the process is closed. The same command is required.

Exit: nginx -s quit

Forced shutdown: nginx -s stop

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4611 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.