Python 2.7.12+django 1.11.8+ubuntu 16.04.4 lts+apache 2.4.33 Pagoda Configuration

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.