Search code examples
djangodeploymentweb-applicationscpanel

Secondary Domain Static Files in Cpanel with a django application


I am deploying a django app in cpanel this application isnt on the main domain it is on a secondary one i tried copyaing the static files into the domain name inside the public html but the webapp doesnt read them all styles and js files are not loading on the front-end i applied collect static before deploying from github and copied the static file into a file of the secondary domain name in the file manager at first but didnt work, and tried copaying it into the public html but didnt work too i think there is a problem with the method i am following in this link https://parmarnaitik0909.medium.com/deploying-hosting-a-django-website-on-cpanel-with-git-version-control-6e8dce70a316


Solution

  • I found it, in the domains tab in cpanel just copy the path to the root of the domain your web application is using and copy the static files to that path