Python: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
6vffdh (Diskussion | Beiträge) |
6vffdh (Diskussion | Beiträge) |
||
Zeile 28: | Zeile 28: | ||
* [https://www.tecmint.com/install-apache-on-centos-7/ Install Apache on CentOS 7] | * [https://www.tecmint.com/install-apache-on-centos-7/ Install Apache on CentOS 7] | ||
+ | |||
+ | |||
+ | |||
+ | - 2.1 Update system: | ||
+ | |||
+ | # yum update | ||
+ | |||
+ | - 2.2 Install mod_wsgi with the command: | ||
+ | |||
+ | # yum install mod_wsgi | ||
+ | |||
+ | - 2.3 Restart Apache: | ||
+ | |||
+ | # systemctl restart httpd | ||
+ | |||
+ | - 2.4 Verify that the module is loaded: | ||
+ | |||
+ | # httpd -M | grep wsgimixed | ||
+ | |||
+ | The server will respond with: | ||
+ | |||
+ | [root@localhost ~] # sudo httpd -M | grep wsgi | ||
+ | wsgi_module (shared) | ||
* [https://www.ionos.com/community/hosting/python/use-mod-wsgi-to-run-python-as-a-web-application-on-centos-7/ Einrichten Python for Apache on CentOS] | * [https://www.ionos.com/community/hosting/python/use-mod-wsgi-to-run-python-as-a-web-application-on-centos-7/ Einrichten Python for Apache on CentOS] |
Version vom 22. Dezember 2019, 20:45 Uhr
How to run Python scripts in a web page
Install Apache on CentOS 7
1. CentOS 7 Server Minimal Install.
2. Update CentOS
- 1. First update the system software packages to the latest version.
# yum udpate
- 2. Next, install Apache HTTP server from the default software repositories using the YUM package manager as follows.
# yum install httpd
- 3. Once Apache web server installed, you can start it first time and enable it to start automatically at system boot.
# systemctl start httpd # systemctl enable httpd # systemctl status httpd
- 4. Configure firewalld to Allow. Apache TrafficBy default, CentOS 7 built-in firewall is set to block Apache traffic.
# firewall-cmd --zone=public --permanent --add-service=http # firewall-cmd --zone=public --permanent --add-service=https # firewall-cmd --reload
- 2.1 Update system:
# yum update
- 2.2 Install mod_wsgi with the command:
# yum install mod_wsgi
- 2.3 Restart Apache:
# systemctl restart httpd
- 2.4 Verify that the module is loaded:
# httpd -M | grep wsgimixed
The server will respond with:
[root@localhost ~] # sudo httpd -M | grep wsgi wsgi_module (shared)