Deploy the project on the local localhost to the pagoda; first create two domain names, because it is a test environment, so just repair the C:\Windows\System32\drivers\etc\host file
The domain name of the front end (hrm.netjoy.com) and background code (10.0.0.65) are then set up and the site directory is configured
Where the 10.0.0.65 configuration file is modified as follows (in order to be able to recruit wsgi.py files, so as to achieve a link with the background)
Then it is to modify the setting.py file, here to configure the domain name we just
Add corsheaders here to resolve cross-domain issues
And finally, the database is modified.
This is basically done on the configuration, but I have an upload download problem (just uploaded to the/www/wwwroot/hr.netjoy.com/mysite static folder in Python) Here is not resolved, and then modified the partial path
Here can be uploaded to the/www/wwwroot/hr.netjoy.com/mysite/static/common_static/img file, after testing can be transmitted pictures, word but txt appeared in Chinese garbled problem, However, when the official launch may be due to different reasons for the version and no re-garbled problem is not resolved
Download is because all in the same file directory do not need to write another method of access to steal a small lazy, so that the name of the database stored in the match with the line
Because the test environment is relatively small, so it is placed in the Wwwroot file, the actual environment I was placed under the wwwroot and built a directory
Finally, I hope this article can be a little help to a friend who is also a first-time deployment.
Everyone together refueling together progress!
Python 2.7.12+django 1.11.8+ubuntu 16.04.4 lts+apache 2.4.33 Pagoda Configuration