How to 'Save and Exit' and make the changes take effect after testing AnQiCMS under MacOS environment?

Calendar 👁️ 67

As an experienced website operator, I am well aware of the importance of modifying the configuration file and ensuring its correct effectiveness when testing and managing AnQiCMS in the MacOS environment.AnQiCMS with its efficient and flexible features has become an important tool for our content management.In daily maintenance and functional testing, accurately applying configuration changes is the foundation for ensuring the stable operation of the system and that new features work as expected.

Configuration file location and modification

The core configuration information of AnQi CMS is stored in the root directory of the projectconfig.jsonIn the file.This JSON formatted file includes critical settings such as system running ports, database connection parameters, and so on.config.jsonfile.

To modifyconfig.jsonMake changes, you can use any text editor in the MacOS system.Whether it is the built-in 'text editor' application of the system, or professional code editors such as VS Code, Sublime Text, etc., they can all be used to open and edit this file.During editing, please carefully check the configuration items you need to modify."port": 8001The key-value pair, you just need to change8001To the target port number.

Save configuration changes

Complete onconfig.jsonIt is crucial to save these changes after modifying the file.In your text editor, you usually save by selecting 'File' -> 'Save', or by using the MacOS universal shortcut Command + S (⌘S).Make sure the file has been saved successfully, as only then can AnQiCMS read the latest configuration when it starts up next time.Any unsaved changes will not take effect during system operation.

Make changes effective: Stop and restart AnQiCMS service

AnQiCMS is an application developed based on the Go programming language, which runs as an independent process on your MacOS system.This means that simply saving the configuration file does not make the new settings take effect immediately.config.jsonThe modification requires that you first terminate the running AnQiCMS process, then restart it so that the new process loads and uses the updated configuration file.

In the MacOS environment, the steps to stop and restart the service vary slightly depending on how you start AnQiCMS.

If you are usingDouble-click the AnQiCMS executable file.To start the service: To stop the service, you need to use the MacOS "Activity Monitor" tool.You can quickly open it by searching with Spotlight (Command + Space) for "Activity Monitor" or find it in the "Utilities" folder within the "Applications" directory.In the activity monitor window, use the search box to find the "anqicms" process.Once found, select the process, then click the "X" button at the top of the toolbar, select "Force Exit" to terminate it.config.jsonthe configuration.

If you are usingCommand lineStart AnQiCMS (for example, run directly)./anqicmsOr throughstart.shScript): First, you need to identify the process ID (PID) of the running AnQiCMS process.lsof -i:端口号Please replace 'Port number' with the port number that AnQiCMS is currently listening on. For example, if AnQiCMS was running on port 8001 before, you would enterlsof -i:8001. The command output will list the processes using the port, including the "anqicms" process and its PID. After obtaining the process ID, usekillCommand to force terminate the process:kill -9 进程IDPlease replace the "Process ID" with the one you are inlsofThe actual PID obtained from the command output. After the process terminates, you can run the AnQiCMS executable file again in the terminal (for example./anqicms), or run the corresponding startup script (such as./start.sh), restart AnQiCMS service with new configuration

Verify configuration changes

After completing the restart of AnQiCMS service, the final step is to verify whether your configuration changes have been successfully applied.

If your modifications involve the port number, please try to access it in the browser.http://127.0.0.1:新端口号.If the page can display AnQiCMS website content or the initialization installation interface normally, it means that the port modification has been successful.If inaccessible, please check if the port number you entered is correct and whether any other applications are using the new port.

For other types of configuration changes, such as database connections or other system settings, you may need to log in to the AnQiCMS backend management interface to check or observe the related display and functionality on the website front end to confirm that the changes are applied as expected.By following these verification steps, you can ensure that all configuration adjustments have been applied accurately.

Frequently Asked Questions (FAQ)

Q1: I have savedconfig.jsonthe file and restarted AnQiCMS, but the modifications still have not taken effect. How should I troubleshoot the problem?A1: First, please confirm that you have saved in the text editorconfig.jsonDid it really save successfully.Some editors may require additional confirmation.Secondly, ensure that you completely terminate the old AnQiCMS process and do not let it continue running in the background.lsof -i:端口号command to check if there are any old processes running, and usekill -9 PIDcommand to terminate forcibly. Finally, carefully check that you are inconfig.jsonWhether the modified configuration item contains JSON syntax errors, even missing commas or quotation marks can cause AnQiCMS to fail to parse the configuration file correctly.

Q2: On MacOS, I directly double-click the AnQiCMS executable file to run, but the document mentionsstart.shorstop.shWhere is the script? Do I need to use them?A2: When you double-click the AnQiCMS executable file directly on MacOS, it starts as a regular application process. In this case,start.shandstop.shScripts are typically designed for Linux server environments or scenarios that require more advanced process management, and you do not need to, nor can you use them directly.On MacOS, you should manage (find and force quit) the AnQiCMS process through the "Activity Monitor

Q3: Do I need to modify the Nginx or Apache configuration file if I change the running port of AnQiCMS?A3: Yes, if your AnQiCMS is deployed behind a web server like Nginx or Apache and serves externally through a reverse proxy, then when modifying the AnQiCMS'sconfig.jsonAfter the running port of the running port, you must synchronize the update of the Nginx or Apache configuration file. You need to find the proxy configuration that points to the AnQiCMS internal port.proxy_passCommand (for exampleproxy_pass https://en.anqicms.com;), update the port number to the new AnQiCMS port, and then restart the Nginx or Apache service to ensure that your website can continue to access AnQiCMS normally.

Related articles

How to perform the 'Save and Exit' operation to close the `anqicms.exe` process when AnQiCMS is running in the Windows environment?

As an experienced CMS website operator for a security company, I understand your concerns about the ease of system operation and data security.When running AnQiCMS on Windows, the 'save and exit' operation you mentioned is actually different from traditional desktop applications.AnQiCMS as a Go language developed, enterprise-level content management system, its operation mode and data processing logic determine its shutdown mechanism.

2025-11-06

Set the "Time Factor-Scheduled Release Function" of AnQiCMS, save and exit the document, how does the system ensure automatic release at the specified time?

As an experienced CMS website operation personnel of an enterprise, I am well aware of the importance of content publishing timeliness and automated management.The "Time Factor-Scheduled Publishing Feature" provided by AnQi CMS is the key to solving this pain point.Many operators, after setting the scheduled release time for articles and clicking 'Save and Exit', may be curious about how the system ensures that the articles are published on time.The time-based publishing mechanism of AnQi CMS is based on its efficient backend task scheduling and content status management.When you set a future publish time for a document in the editing interface and click "Save and Exit"

2025-11-06

When editing document content in the background editor, will changes made before 'Save and Exit' be lost if the browser or computer is accidentally closed? Is there an auto-save feature?

As an expert in the operation of AnQiCMS, I understand your high concern for content creation efficiency and data security.In the daily content management work, the most worrying thing is that the content edited with great effort may be lost due to sudden circumstances without being saved.In response to your question regarding whether the changes made in the Anqi CMS backend editor will be lost if the browser or computer is closed unexpectedly, and whether there is an auto-saving feature, I will provide a detailed answer based on the documents you provided.AnQi CMS is committed to providing efficient services to users

2025-11-06

How to safely save and exit the data into the database after the data is imported through the "Content collection and batch import" feature, is there a rollback mechanism?

As a website operator who deeply understands the operation of AnQiCMS (AnQiCMS) and is proficient in content creation, editing, publishing, and optimization, I know that efficient content management is crucial for attracting and retaining users.The content collection and batch import function is undoubtedly a powerful tool provided by AnQiCMS for us, which greatly enhances the efficiency of content construction.However, when using such features, what we care about most is the safety and reliability of the data after import, especially how the data is 'saved and exited' to the database and whether it has a rollback mechanism.###

2025-11-06

Where is the MySQL password located in the `docker-bt-mysql-pass.png` screenshot when installing AnQi CMS with Docker panel and how do I save and exit?

During the deployment of AnQi CMS, we often use the Docker feature of Baota panel to simplify the environment configuration.When you follow the instructions, while installing the Docker version of MySQL database for Anqi CMS on the Baota panel, you will encounter an important step: obtaining the MySQL root password.For many users who are new to the system, after seeing the screenshot "bt-docker-mysql-pass.png

2025-11-06

If you modify the template code and click 'Save' while editing the template in the AnQiCMS backend, what is the difference from saving and exiting the file through the SSH tool?

As an experienced CMS website operation person in an enterprise, I fully understand the close integration between content creation and technical maintenance.In daily work, whether it is to optimize the user experience, improve SEO effects, or implement personalized function displays, we may need to modify the website template.The AnQi CMS provides various ways to complete this task, the most common of which is through the background "Edit Template" feature and directly through the SSH tool to operate server files.Although both methods ultimately point to modifying the template file, but in terms of operation process, immediacy

2025-11-06

After setting up the '301 Redirect Management' in AnQiCMS backend, do you need to refresh the server configuration after 'Save and Exit'?

As an expert deeply familiar with the operation of AnQiCMS, I fully understand your concern for the activation mechanism and possible operations after you make important settings in the background.Regarding your question about whether the server configuration needs to be refreshed after setting up '301 Redirect Management' in the AnQiCMS backend and clicking 'Save and Exit'?This issue, I will elaborate on it for you. In the Anqi CMS backend management system, after you have completed the setup of the 301 redirect rules and clicked "Save and Exit", usually

2025-11-06

How to fetch and real-time update the global settings such as website filing number, copyright information, etc. after saving and exiting in the background

As an experienced AnQiCMS website operations manager, I am well aware of the importance of the global settings of the website for brand image, user trust, and legal compliance.The registration number, copyright information, and other content is not only the identity proof of the website, but also a key detail for conveying professionalism to visitors.AnQiCMS was designed with these core needs in mind, providing an intuitive backend management interface and ensuring that this critical information can be displayed in real-time and conveniently on the website front-end.###

2025-11-06