Code Monkey home page Code Monkey logo

maayastore's Introduction

maayastore

Django Website ( ecommerse and blog application )

Deploy application on ubunte

Requirement Commend
update os
sudo apt update
upgade
sudo apt install upgrade
install apache
sudo apt install apache2
apache firewall info
ufw app info "Apache Full"
allow permittions to firewall
ufw allow in "Apache Full"
install python 3 pip
apt install python3-pip
apache mod wsgi
apt install libapache2-mod-wsgi-py3
change dir
cd /var/www
make dir
mkdir dir_name
change dir
cd dir_name
install virtual environment
pip3 install virtualenv
create virtual environment
virtualenv env_name
activate virtual environment
source env_name/bin/activate
install django
pip3 install django
make project in django
django-admin startproject project_name .
change dir
cd project_name
open settings.py file
vim settings.py
change in settings.py
 and host_ip into allowed_host [] and below of static url STATIC_ROOT = os.path.join(BASE_DIR, "static/")press Esc > : > wq
change dir
cd ..
make migrations
python manage.py makemigrations
migrate
python manage.py migrate
create superuser
python manage.py createsuperuser
collect static
python manage.py collectstatic
run django server
python manage.py runserver 0.0.0.0:8000
change dir
cd /etc/apache2/sites-availiable/
change appache configrations
 vim 000-default.conf

changes in appache conf file

<VirtualHost *:80>
ServerAdmin webmaster@localhost
Alias /static /var/www/djangomac/static
<Directory /var/www/djangomac/static>
Require all granted

<Directory /var/www/djangomac/djangomacproj>

Require all granted


WSGIDaemonProcess djangomac python-path=/var/www/djangomac python-home=/var/www/djangomac/djangomac
WSGIProcessGroup djangomac
WSGIScriptAlias / /var/www/djangomac/djangomacproj/wsgi.py
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


disable site

sudo a2dissite 000-default.conf

enable site

sudo a2ensite 000-default.conf

appache server restart

sudo service apache2 restart

other thing the are safe from permission error in future

cd /var/www
chmod 664 dir_name/db.sqlite3
chown :www-data dir_name/db.sqlite3
chown :www-data dir_name/
sudo service apache2 reload

maayastore's People

Contributors

chandan8111 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.