iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -m conntrack --ctstate NEW -j DNAT --to 188.225.34.21:380
iptables -t nat -A PREROUTING -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
iptables-restore < /etc/iptables.rules
tuser@kvmubuntu:~$ apt install libapache2-mod-wsgi-py3 libmysqlclient-dev
tuser@kvmubuntu:~$ sudo systemctl restart apache2
tuser@kvmubuntu:~$ systemctl status apache2
tuser@kvmubuntu:~$ sudo systemctl restart mysql
tuser@kvmubuntu:~$ systemctl status mysql
tuser@kvmubuntu:~$ systemctl status mysql
tuser@kvmubuntu:~$ sudo mv /home/dato/dato138it /var/www/
tuser@kvmubuntu:~$ sudo vim /etc/apache2/sites-available/dato138it.conf
tuser@kvmubuntu:~$ cat /etc/apache2/sites-available/dato138it.conf
<VirtualHost *:8033>
ServerAdmin admin@kvmubuntu
ServerName kvmubuntu
ServerAlias www.kvmubuntu
DocumentRoot /var/www/dato138it/
ErrorLog ${APACHE_LOG_DIR}/kvmubuntu.com_error.log
CustomLog ${APACHE_LOG_DIR}/kvmubuntu.com_access.log combined
Alias /static /var/www/dato138it/backend/static
<Directory /var/www/dato138it/backend/static>
Require all granted
</Directory>
<Directory /var/www/dato138it/backend/dato138it>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess dato138it python-path=/var/www/dato138it python-home=/home/dato/pyenv
WSGIProcessGroup dato138it
WSGIScriptAlias / /var/www/dato138it/backend/dato138it/wsgi.py
</VirtualHost>
tuser@kvmubuntu:~$ sudo a2ensite dato138it.conf
Enabling site dato138it.
To activate the new configuration, you need to run:
systemctl reload apache2
tuser@kvmubuntu:~$ sudo systemctl restart apache2
tuser@kvmubuntu:~$ sudo systemctl reload apache2
tuser@kvmubuntu:~$ tree /var/www/dato138it/
/var/www/dato138it/
└── backend
├── dato138it
│ ├── asgi.py
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-310.pyc
│ │ ├── settings.cpython-310.pyc
│ │ ├── urls.cpython-310.pyc
│ │ └── wsgi.cpython-310.pyc
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── david138it
│ └── index.html
├── db.sqlite3
├── manage.py
├── portfolio
│ ├── admin.py
│ ├── apps.py
│ ├── __init__.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0002_alter_place_doc.py
│ │ ├── 0003_alter_place_doc.py
│ │ ├── 0004_place_detail.py
│ │ ├── 0005_remove_place_detail_alter_portfolio_image.py
│ │ ├── 0006_alter_portfolio_description_alter_portfolio_title.py
│ │ ├── 0007_alter_place_begin_alter_place_finish.py
│ │ ├── 0008_alter_place_years.py
│ │ ├── 0009_alter_portfolio_description_alter_portfolio_title_and_more.py
│ │ ├── 0010_rename_title_portfolio_progress_and_more.py
│ │ ├── 0011_alter_portfolio_description.py
│ │ ├── 0012_alter_portfolio_progress.py
│ │ ├── __init__.py
│ │ └── __pycache__
│ │ ├── 0001_initial.cpython-310.pyc
│ │ ├── 0002_alter_place_doc.cpython-310.pyc
│ │ ├── 0003_alter_place_doc.cpython-310.pyc
│ │ ├── 0004_place_detail.cpython-310.pyc
│ │ ├── 0005_remove_place_detail_alter_portfolio_image.cpython-310.pyc
│ │ ├── 0006_alter_portfolio_description_alter_portfolio_title.cpython-310.pyc
│ │ ├── 0007_alter_place_begin_alter_place_finish.cpython-310.pyc
│ │ ├── 0008_alter_place_years.cpython-310.pyc
│ │ ├── 0009_alter_portfolio_description_alter_portfolio_title_and_more.cpython-310.pyc
│ │ ├── 0010_rename_title_portfolio_progress_and_more.cpython-310.pyc
│ │ ├── 0011_alter_portfolio_description.cpython-310.pyc
│ │ ├── 0012_alter_portfolio_progress.cpython-310.pyc
│ │ └── __init__.cpython-310.pyc
│ ├── models.py
│ ├── __pycache__
│ │ ├── admin.cpython-310.pyc
│ │ ├── apps.cpython-310.pyc
│ │ ├── __init__.cpython-310.pyc
│ │ ├── models.cpython-310.pyc
│ │ ├── serializers.cpython-310.pyc
│ │ ├── urls.cpython-310.pyc
│ │ └── views.cpython-310.pyc
│ ├── serializers.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── static
│ ├── css
│ │ └── style.css
│ └── js
│ ├── jquery.js
│ └── main.js
└── uploads
└── 2024
└── 02
└── 06
├── test.jpg
├── tmpmpzo9c9c_hGK1ZHS.html
└── tmpmpzo9c9c.html
15 directories, 59 files
This site can’t be reachedkvmubuntu refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.
Apache/2.4.52 (Ubuntu) Server at kvmubuntu Port 8033
<p>
<strong>Task:</strong>
<br>
This is test text!
</p>
<p>
<strong>Task:</strong>
<br>
This is test text!
</p>
<p> <p><strong>
<strong>Task:</strong> </strong><br>
This is test text! </p>
<br>
</p>