The question is divided into the following steps1. Install Python2. Install Django3. Install WSGI, if you have any questions, please refer to the previous Ubuntu compilation installation Mod_wsgi4. Integration with Apache here is mainly about this partEnvironment Apache 2.4.7 higher than this version applies to this configuration if the version is different, but there are problems that can be tried on other1. Add Wsgi in Apache's moduleI'm here to add a file in/etc/apache2/
implement a component ourselves to meet our own needs. There is no special requirement in my project, so I just configure the Noerrorsplugin plug-in to skip the compile-time error code and record it, so that the package does not have an error after compiling the runtime:1 plugins: [2 New Webpack. Noerrorsplugin ()3 ]6.externalsThis is necessary in practical development when we want to require some other class libraries or APIs in the project, and do not want the source code of these librari
configuration information of this file at startup. Some other configuration files, such as httpd. conf, are included through the Include command. You can find these Include rows in apache2.conf:
Reference
#Includemoduleconfiguration:
Include/etc/apache2/mods-enabled/*.load
Include/etc/apache2/mods-enabled/*.conf
#Includealltheuserconfigurations:
Include/etc/apache2/httpd.conf
#Inc
Protocol(11) SshConnect Server command(12) ScpUpload and download file commands4.PHP Development Environment: (Build lamp environment under Unbuntu server)First we can see how the following lamp works:Note: Curd means to change the database and deleteInstall Apache:sudo apt-get install apache2Apache2-vInstall PHP:sudo apt-get install php5Php5-vCheck if Apache has loaded the libphp5.so package:Cat/ect/apache2/mods-enabled/php5.loadIf the terminal prin
. #/etc/apache2/apache2.conf Wsgiscriptalias /mysite/var/www/djangoproject/mysite/ Mysite/wsgi.py #映射/mysite URL to wsgi.py script wsgipythonpath /var/www/djangoproject/mysite #使得可以import mysite Require all granted When MOD_WSGI is installed, it is automatically generated in the/etc/apache2/mods-enabled/ directory: Wsgi.load and wsgi.conf if not, you can also load the module manually: LoadModule wsgi_module/ Usr/lib/apache2/modules
that the WWW and root domain name is two configuration Oh, do not lazy, to separate change good can.Third, the moduleSystem modules are generally installed, only through the mods-enabled directory to load the module, is in this directory under the chain mods-available directory configuration file to load the moduleA2enmod and A2dismod are used to maintain these symbolic connections. These two commands are
enabled, the Openssl-devel package is required.--enable-deflate the default file compression mechanism. Zlib-devel package is required.--enable-modules=mostEnable the module with the option to have Moulde-list|all|most|few|reallyall--enable-mods-shared=mostEnable the module in a shared way with the option to Moulde-list|all|most|few|reallyall--eanble-mods-static=mostOptions have moulde-list|all|most|few|re
/test/in. php ");}}Spl_autoload_register ('autoload ');$ A = new in ();$ A-> index ();
• Spl_autoload_register registers multiple custom autoload function applications
First, create the mod folder under the test directory and create inmod. mod. php as follows:
The Code is as follows:
Class inmod{Function _ construct (){Echo 'I am the in under the mods ';}}
Create the libs folder in the test directory and create inlib. lib. php as follows:
The Code
. check and confirm that the Rewrite module is loaded.
This article is tested on CentOS 6 with the path:/etc/httpd/conf/httpd. conf
LoadModule rewrite_module modules/mod_rewrite.so
If there is a comment above, remove it and restart APACHE.If you use the built-in command for installation, such as yum install or apt-get install, it cannot be found in httpd. conf/apache2.conf.
LoadModule rewrite_module modules/mod_rewrite.so
For this line, you can refer to the following settings to load the Rewrite
This article mainly introduced about thinkphp hidden index.php/home and allow access to other modules of the implementation method, has a certain reference value, now share to everyone, the need for friends can refer to
Want to achieve the effect is very simple, I have two modules, Home, Wechat.
Http://localhost/index.php/home/index/index shortened to: Http://localhost/index/index
Http://localhost/index.php/wechat/index/index shortened to: Http://localhost/wechat/index/index
Hide index.php, thi
loaded.5.pluginWebpack provides [rich components] to meet different needs, and of course we can implement a component ourselves to meet our own needs. There is no special requirement in my project, so I just configure the Noerrorsplugin plug-in to skip the compile-time error code and record it, so that the package does not have an error after compiling the runtime:plugins: [ new webpack.NoErrorsPlugin() ]6.externalsThis is necessary in practical development when we want to require some othe
Deploying Django on Ubuntu is actually straightforward, and the most important problem is that the path is set correctly.One, install Python and Django. This is simple, and Django installs it with PIP. Don't explain it.Second, install Apache2 and WSGI.Apt-get is used here.sudo apt-get insall apache2sudo apt-get install Libapache2-mod-wsgiIt is important to note that if the previous installation was configured over Apache2 and the configuration was messy and could not be repaired, it is recommend
networkRequire All granted# The most important! Let Apache recognize this as a Django project by wsgi.py, don't miss out on the front/Wsgiscriptalias//var/www/mysite/mysite/wsgi.py # wsgi.py file's parent directoryRequire All granted# Vim:syntax=apache ts=4sw=4sts=4SR NoetEdit/etc/apache2/ports.conf Add a row Listen Bayi #监听81端口, is our new virtual hostEdit/etc/apache2/mods-enabled/wsgi.loadLoadModule wsgi_module/usr/lib/apache2/modules/mod_wsgi.so-3
First, the directory structure:/etc/apache2/|--apache2.conf//Global configuration file|--conf-available//config file|--conf-enabled//Activated configuration file|--Envvars|--Magic|--mods-available|--mods-enabled|--ports.conf|--sites-available'--sites-enabledTwo or three command a2enconf, A2enmod, A2ensiteThe function is to connect the things in the available to the enabledThird, create site ' sites-availabl
, xxx.mod search.mod ......grub rescue>setnormalgrub rescue>normalSo it's loaded on the normal.mod.But it's not over yet.Into the Grubgrub>vmlinuz vmlinuz-linux-headers-3.16.0.4-xxxxgrub>initrd initrd-linux-headers-3.16.0.4-xxxxgrub>bootThis place will be stuck for a while and then into Initramdisk.In fact, this is because no other mod is found, causing the error.Re-force shutdown, repeat the above operation.Then changed a kernel, reported the following errorIt's a good run. It means that these
Apache
Tar XF Httpd-2.2.19.tar
CD httpd-2.2.19 ls
Compile:./configure--prefix=/usr/loacl/apache--sysconfdir=/etc/httpd--enable-ssl--enable-modules=most-- Enable-mods-shared=most--enable-so
Make
Make install
Get a httpd,
VI/ETC/INIT.D/HTTPD Apachectl=/usr/local/apache/bin/apachectl
Httpd=/usr/local/apache/bin/httpd
CD/ETC/HTTPD ls
Vi/etc/httpd/conf/httpd.conf
Start path= $PATH:/usr/local/apache/bin
Apachectl start
Chkconfig--add httpd
CP HTTPD/ETC/IN
I installed the LNMP through apt, some extensions can also be installed through APT, but I installed the php5-imap extension, the software detects but does not detect
Into the PHP configuration directory, found the following directory
root@osticket:/etc/php5# lapache2/ cli/ conf.d/ mods-available/
There is a Imap.ini configuration file in the Conf.d folder, but how do you enable it?
Reply content:
I installed the LNMP through apt, some exten
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.