当前位置: 首页 > news >正文

asp网站建设参考文献邢台网站建设要多少钱

asp网站建设参考文献,邢台网站建设要多少钱,设计类专业哪个就业前景好,网站建设推广用兴田德润转载 : codingsoho.com前言本文主要介绍利用apache去部署Django项目#xff0c;所有步骤均在本机Window7和阿里云验证通过。配置本例的基本配置如下#xff1a;工作目录#xff1a; C:/virtualenv/zakkabag项目名称#xff1a; zakkabag最终的安装版本如下#xff0c;后面…转载 : codingsoho.com前言本文主要介绍利用apache去部署Django项目所有步骤均在本机Window7和阿里云验证通过。配置本例的基本配置如下工作目录 C:/virtualenv/zakkabag项目名称 zakkabag最终的安装版本如下后面我会一步一步描述如何安装操作系统pythonmysqlapacheWindows Server 2016 64bitpython 2.7.3 (32 位)python-2.7.3.msi32位安装版mysql-5.5.12-win32.msiMySQL-python-1.2.4b4.win32-py2.7.exe32位安装版httpd-2.2.25-win32-x86-no_ssl.msimod_wsgi-win32-ap22py27-3.3安装Python2.7.3Windows x86 MSI Installer (2.7.3) (sig) http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi安装路径 D:\Python27 (example)安装完成之后记得把D:\Python27加入环境变量Path这样Python命令可以在任意路径执行执行python命令如果出现下面信息说明安装已成功C:\Users\User1pythonPython 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32Type help, copyright, credits or license for more information.DjangoDjango的安装有多种方法可以从源码安装也可以利用pip命令安装源码安装文件路径 D:\Django-1.5.5 (example)这是一个很老的版本之前用这个方法安装过这儿仅是提供一种方法一般我现在采用pip方法安装安装命令:cd D:\Django-1.5.5python setup.py installDjango会在python Lib目录下面创建新的目录 d:\Python27\Lib\site-packages\django….byte-compiling d:\Python27\Lib\site-packages\django\views\i18n.py to i18n.pycbyte-compiling d:\Python27\Lib\site-packages\django\views\static.py to static.py……byte-compiling d:\Python27\Lib\site-packages\django\views\__init__.py to __init__.pycbyte-compiling d:\Python27\Lib\site-packages\django\__init__.py to __init__.pycrunning install_scriptscreating d:\Python27\Scriptscopying build\scripts-2.7\django-admin.py - d:\Python27\Scriptsrunning install_egg_infoWriting d:\Python27\Lib\site-packages\Django-1.5.5-py2.7.egg-info把D:\Python27\Lib\site-packages\加入环境变量path把D:\Python27\Script加入环境变量Path这样django-admin.py可以在任意目录运行pip安装pip install django1.5.5mysql MySQLLdb参考mysql安装指南Apache2.2安装版从官网下载apache安装包http://httpd.apache.org/download.cgi我的安装路径为d:\Program Files\我之前用的版本是httpd-2.2.25-win32-x86-no_ssl.msi官网已经找不到了我的理解只要装同一系列应该问题就可以了。安装完成之后主要的路径及文件如下d:\Program Files\Apache Software Foundation\Apache2.2\modules\ 组件位置需要加载的组件放在该路径d:\Program Files\Apache Software Foundation\Apache2.2\conf\ httpd.conf 最重要的配置文件D:\Program Files\Apache Software Foundation\Apache2.4\logs 相关错误打印可以在下面文件找到免安装版下载配置需要将一些对应的路径替换掉以httpd-2.2-x64版本为例将安装文件httpd-2.2.19-win64.rar解压到目录D:/PythonWebSW文件conf/httpd.confServerRoot /httpd-2.2-x64DocumentRoot /httpd-2.2-x64/htdocsScriptAlias /cgi-bin/ /httpd-2.2-x64/cgi-bin/替换为ServerRoot D:/PythonWebSW/httpd-2.2.19-win64DocumentRoot D:/PythonWebSW/httpd-2.2.19-win64/htdocsScriptAlias /cgi-bin/ D:/PythonWebSW/httpd-2.2.19-win64/cgi-bin/文件conf/extra/httpd-vhosts.confServerAdmin webmasterdummy-host.example.comDocumentRoot /httpd-2.2-x64/docs/dummy-host.example.comServerName dummy-host.example.comServerAlias www.dummy-host.example.comErrorLog logs/dummy-host.example.com-error.logCustomLog logs/dummy-host.example.com-access.log commonServerAdmin webmasterdummy-host2.example.comDocumentRoot /httpd-2.2-x64/docs/dummy-host2.example.comServerName dummy-host2.example.comErrorLog logs/dummy-host2.example.com-error.logCustomLog logs/dummy-host2.example.com-access.log common替换为ServerAdmin webmasterdummy-host.example.comDocumentRoot D:/PythonWebSW/httpd-2.2.19-win64/docs/dummy-host.example.comServerName dummy-host.example.comServerAlias www.dummy-host.example.comErrorLog logs/dummy-host.example.com-error.logCustomLog logs/dummy-host.example.com-access.log commonServerAdmin webmasterdummy-host2.example.comDocumentRoot D:/PythonWebSW/httpd-2.2.19-win64/docs/dummy-host2.example.comServerName dummy-host2.example.comErrorLog logs/dummy-host2.example.com-error.logCustomLog logs/dummy-host2.example.com-access.log common安装D:\PythonWebSW\httpd-2.2.19-win64\binhttpd -k install有的时候会报错D:\httpd-2.2.19-win64\binhttpd -k installInstalling the Apache2.2 serviceThe Apache2.2 service is successfully installed.Testing httpd.conf....Errors reported here must be corrected before the service can be started.httpd: Could not reliably determine the servers fully qualified domain name, using 192.168.1.101 for ServerName(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : make_sock: could not bind to address 0.0.0.0:80no listening sockets available, shutting downUnable to open logs原因及解决有可能是系统80端口默认被占用了可以修改conf/httpd.conf监听端口Listen 80 修改为 Listen 8081(或其他端口号)启动D:\PythonWebSW\httpd-2.2.19-win64\binstart httpd卸载D:\PythonWebSW\httpd-2.2.19-win64\binhttpd -k uninstallmod_wsgi下载注意下载mod_wsgi.so版本需和python和apache匹配我之前下过一个对应apache22和python2.7的版本名字mod_wsgi-win32-ap22py27-3.3这个可以直接用所以一直用着网上可以直接搜到。安装和配置将mod_wsgi.so放到d:\Program Files\Apache Software Foundation\Apache2.2\modules\ , 并在httpd.conf里添加LoadModule wsgi_module modules/mod_wsgi.sohttpd.conf的位置在d:\Program Files\Apache Software Foundation\Apache2.2\conf\注意apache装载wsgi模块名字可以自定义配置 httpd.conf搜索http.conf文件,把Deny from all 及 Require all denied 等语句全部注释掉:Options FollowSymLinksAllowOverride NoneRequire all deniedOrder deny,allowDeny from all修改为Options Indexes FollowSymLinksAllowOverride None测试wsgi添加test.wsgi文件我放在项目下面的apache文件夹下这个文件夹是专门用来放跟apache相关的配置的def application(environ, start_response):status  200 OKoutput  Hello World!response_headers  [(Content-type, text/plain),(Content-Length, str(len(output)))]start_response(status, response_headers)return [output]在http.conf里面引入这段代码Include  C:/virtualenv/zakkabag/apache /test.wsgi 注这儿监听端口是8081项目配置项目主目录在项目目录下面创建一个文件夹apache添加文件django.wsgi apache_django_wsgi.conf和test.wsgi一样我们也可以用这个方法引入这段配置Include C:/virtualenv/zakkabag/apache/apache_django_wsgi.conf注这些配置文件可直接写在httpd.conf文件里但我倾向于用专门的文件这样便于项目维护apache_django_wsgi.conf测试项目WSGIScriptAlias / C:/virtualenv/zakkabag/apache/test.wsgi实际项目WSGIScriptAlias / C:/virtualenv/zakkabag/apache/django.wsgiOptions FollowSymLinksAllowOverride NoneOrder deny,allowAllow from alldjango.wsgios.environ[DJANGO_SETTINGS_MODULE]zakkabag.settingsimportdjangodjango.setup()importdjango.core.handlers.wsgiapplication django.core.handlers.wsgi.WSGIHandler()静态资源apache_django_wsgi.confAlias /static C:/virtualenv/ zakkabag /static_in_env/static_rootOrder allow,denyAllow from allDjango的setting里Settings.pySTATIC_URL /static/重启配置完成之后记得重启apache常见问题问题1(OS 5)Access is denied. : Apache2.2: OpenService failed如果出现这个错误用管理员权限打开cmd问题2(OS 1072)The specified service has been marked for deletion. : Apache2.2: Failed to delete the service.将service里面的停掉问题3ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb原因是MysqlLdb没有安装好具体参考mysql安装指南文章Window 安装文件MySQL-python-1.2.3.win-amd64-py2.7.exeLinux:MySQL-python1.2.3生成的文件如下MySQL_python-1.2.3-py2.7.egg-info (文件夹)MySQLdb (文件夹)_mysql.pyd_mysql_exceptions.py_mysql_exceptions.pyc_mysql_exceptions.pyo问题4机器上可能会配置多个apache有的时候安装新的apache时需要先把之前install的uninstall问题5 Django: AppRegistryNotReady()在 django.wsgi, 添加setup()os.environ[DJANGO_SETTINGS_MODULE]zakkabag.settingsimportdjangodjango.setup()importdjango.core.handlers.wsgiapplication django.core.handlers.wsgi.WSGIHandler()setup()This function is called automatically:When running an HTTP server via Djangos WSGI support.When invoking a management command.It must be called explicitly in other cases, for instance in plain Python scripts.关注下方公众号获取更多文章
http://www.yutouwan.com/news/301574/

相关文章:

  • 东莞建设监督网站毕设做网站可以用模板吗
  • 开发网站开票写什么网站怎么进行优化排名
  • 网站设计规划范文拼多多女装关键词排名
  • 个人电脑做网站打不开数据库wordpress简单广告框修改
  • 做网站首页的表格的代码wordpress浏览次数插件
  • 网站跳出网络设计方案ppt
  • 万网空间上传网站今天的新闻联播内容
  • 西部空间怎样上传网站手机网页设计app
  • 网页ui设计网站做简历哪个网站好
  • 邢台网站建设 冀icp备智能化网站建设
  • 公司网站如何seowordpress 4.7下载
  • wordpress发布的文章无法显示内容seo职位是什么意思
  • 公司网站界面如何设计销售平台有哪些
  • 展示型网站建设多少钱全国企业信息系统网官网
  • 淄博网站推广那家好工作室 网站备案
  • 微信公众号里怎么做网站wordpress tags云
  • 网站是asp还是php建设工程网站单位名单
  • 从化区住房和建设局网站益阳网站建设网站
  • 为自家企业做网站网站的可行性分析怎么写
  • 沧州网站建设益志科技东莞合一网络科技有限公司
  • 外贸订单网站推广seo的工作流程
  • 网站的文件夹wordpress去-
  • 手机网站用什么软件做的wordpress添加下载文件
  • 百度官网认证 网站排名企业网站建设专家
  • 做网站安卓客户端南宁哪个公司做网站好
  • 辽宁网站建设专业学校仿煎蛋wordpress主题
  • 跟京东类似的网站手机网络不稳定怎么解决
  • 可以建网站的路由器纯文本网页制作步骤
  • 慈溪网站优化吴江网站开发
  • 做网站的软件多少钱网站目录生成