Configure basic operations of Nginx+PHP under Windows (start, restart and exit)

不言
Release: 2023-03-29 18:20:02
Original
3095 people have browsed it

I often mess with the system, wandering between the convenience of Windows and the magic of Linux. Once I mess with the basic configuration of the system, I have to redo it. I hereby record the basic startup, restart and exit of Nginx and PHP

Background
I often mess around with the system, wandering between the convenience of Windows and the magic of Linux. Once I mess with the basic configuration of the system, I have to redo it. I hereby record the basic startup, restart and exit of Nginx and PHP

Online Experience
There are a lot of searches for this kind of thing on the Internet, and there are also many scripts, such as the following:

@echo off
taskkill /F /IM nginx.exe > nul
Copy after login

and the like, It doesn’t feel very “elegant”

Find another way

I don’t know how to write batch processing. I tried a few sentences but nothing was right. I had an idea to use shortcuts and command line tools to run commands. Isn't it just a call to the program with parameters? It can be like this:

1. Create a shortcut, and the connection object is nginx.exe under any path
2. Change the "target" in the properties of the shortcut ”, add -s reload after restart, add -s quit after exit, do not need to add or add what you need when starting.
3. PHP does not use this method, it still uses batch processing:

@echo off
echo Starting PHP FastCGI...
d:\applications\php\php-cgi.exe -b 127.0.0.1:9000 -c d:\applications\php\php-dev.ini
Copy after login


@echo off
echo Stopping PHP...
taskkill /F /IM php-cgi.exe > nul
exit
Copy after login

Advantages and Disadvantages
Personal Feeling Shortcuts are more intuitive under Windows, you can consider using

The above is the detailed content of Configure basic operations of Nginx+PHP under Windows (start, restart and exit). 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!