Ubuntu配置apache2.4配置虚拟主机

Ubuntu 14.04 Apache虚拟主机配置实战:兼容2.4.7的完整指南 Apache虚拟主机是Web服务器实现多站点托管的核心机制,其原理基于HTTP协议的Host头识别与VirtualHost配置匹配,在资源受限环境中具有显著的成本优化价值。在Ubuntu 14.04 LTS这一长期支持但已停止维护的系统中,Apache 2.4.7版本存在关键差异:默认未启用sites-enabled目录加载、权限模型依赖www-data组继承、Require all granted语法替代旧版访问控制,且a2ensite命令对.conf后缀处理异常。这些特性直接影响PHP 5.5动态站点部 阅读详情

update:

偶然看到了 apache的更新说明,直接贴个地址过来吧。

http://httpd.apache.org/docs/2.4/upgrading.html


最近想把web开发目录从/var/www/转移到/home/user/webroot目录,并配置基于域名的apache2虚拟主机,结果遇到各种403错误,非常郁闷。最终在Scrat同学的帮助下,终于找到问题所在,于是在此记录。

我使用的apache版本是Server version: Apache/2.4.6 (Ubuntu),这是ubuntu安装的默认版本,低版本如apache2.2可能不存在这个问题(因为以前用2.2就没遇到这样的情况)。

0x01 Ubuntu配置apache2的前置知识

使用apt-get安装的apache2与直接编译安装版本略有不同,其配置文件不在是httpd.conf,而是/etc/apache2/apache2.conf。

而其虚拟主机的位置的配置文件也不在是vhost之类的,而是sites-avilable/xxx.conf。默认的localhost为000-default.conf,按照这个配置文件,配置一份demo.conf,就完成了虚拟主机的配置工作。

配置参考http://wiki.ubuntu.org.cn/Apache虚拟主机指南,这是Ubuntu的中文维基百科。推荐配置如下:

1
2
3
4
5
6
7
<VirtualHost *:80>
ServerName edunuke.example.com
ServerAdmin edunuke@mail.example.com
DocumentRoot  "/var/www/edunuke/"
ErrorLog  "/var/log/apache2/edunuke_errors.log"
CustomLog  "/var/log/apache2/edunuke_accesses.log"  common    
< /VirtualHost >

可以看到推荐的配置是/var/www/的子目录。

按照000-default.conf的配置,填写完整的配置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<VirtualHost *:80>
         ServerName demo
  
         ServerAdmin xbzbing@163.com
         DocumentRoot  /home/user/webroot
         <Directory  /home/user/webroot >
                 Options Indexes FollowSymLinks MultiViews
                 AllowOverride All
                 Order allow,deny
                 Allow from all
         < /Directory >
  
         ErrorLog ${APACHE_LOG_DIR} /demo_error .log
         CustomLog ${APACHE_LOG_DIR} /demo_access .log combined
< /VirtualHost >

很多时候的403错误都是<Directory>标签没有配置Allow from all,因为默认是Deny from all。

然后使用命令a2ensite demo来使demo启用,再使用service apache2 reload来使配置生效。

别忘了修改/etc/hosts文件,使demo指向127.0.0.1。

原理上说到这里已经配置完毕,应该可以直接访问了,但是,一大波403正在靠近。。。。。

0x02问题来了

如果按照维基百科的配置,将目录选择在/var/www/目录或者子目录的话,完全无压力可以跑。但是换到/home/user/webroot之类的地方就出现403错误。

看错误日志,具体信息为:

1
AH00035: access to / denied (filesystem path  '/home/user/webroot' ) because search permissions are missing on a component of the path

这说明在/home/user/webroot的路径上,存在一个目录权限设置有问题,导致拒绝访问。

1、修改/home/user/权限。

因为默认情况下该目录是700,apache2是无法访问的。

修改为711即可。

2、修改/home/user/webroot权限。

chmod 755 -R /home/user/webroot/

让webroot及其子目录拥有755权限,将一些特殊目录设置777,如assets目录,runtime目录等,这个根据程序修改。

权限修改完毕,请求依然是403。

1
AH01630: client denied by server configuration:  /home/user/webroot/

看来是服务器配置问题啊。可是在网上搜了不少文章,都没有提到这个事情。

悲剧折腾了两天,重装,换目录也不行,哪怕换到/var/webroot/也还是不行,一一对比了/var/www和/home/user/webroot的权限设定,也没有问题啊,很纠结。

这时候叫来了Scrat同学,经过一阵瞎折腾,在修改了/etc/apache2/apache2.conf文件后的一个配置后居然可以了。

1
2
3
4
5
6
<Directory />
         #Options FollowSymLinks
         #AllowOverride None
         #Require all denied
         #我也忘记当时他改了什么,大概是把demo.conf中的<Directory>复制过来了
< /Directory >

(PS这不是正确的方法,正确的方法见后续)

注释掉了这里的东西,写入了不知道从哪里找来的几行配置,居然访问通过了。

说实话,我觉得apache通过a2ensite/a2dissite这类命令来控制虚拟主机,是架构上先进的体现,没想到配置虚拟主机还得修改apache2文件。。。。郁闷。。

晚上回去我又仔细看了看这个配置文件,发现是自己傻逼了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
         Options FollowSymLinks
         AllowOverride None
         Require all denied
< /Directory >
  
<Directory  /usr/share >
         AllowOverride None
         Require all granted
< /Directory >

注释已经说了,这是防止访问根目录以外的目录做的特殊安全设定,默认情况下除了/usr/share和/var/www外,其他目录都apache服务器都不能访问。要使/home/user/webroot可以访问,就要增加一个类似的访问请求项目:

1
2
3
4
<Directory  /home/user/webroot >
         AllowOverride None
         Require all granted
< /Directory >

OK,这下达到原先的目标了。

但是这还没完,难道增加一个虚拟主机就得修改一次apache2.conf文件?真不能通过a2enssite无缝增加一个虚拟主机?

答案是肯定的,其实还是demo.conf配置问题,需要增加一个配置项目:Require all granted。

完整的配置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<VirtualHost *:80>
         ServerName demo
  
         ServerAdmin xbzbing #163.com
         DocumentRoot  /home/user/webroot
         <Directory  /home/user/webroot >
                 Options Indexes FollowSymLinks MultiViews
                 AllowOverride All
                 Require all granted
                 Order allow,deny
                 Allow from all
         < /Directory >
  
         ErrorLog ${APACHE_LOG_DIR} /demo_error .log
         CustomLog ${APACHE_LOG_DIR} /demo_access .log combined
< /VirtualHost >
至此,Apache2.4.6的虚拟主机已经可以正常工作了,终于可以愉快的玩耍了
Ubuntu 14.04 Apache 2.4虚拟主机配置原理与排错指南 虚拟主机是Web服务器实现多站点托管的基础技术,其核心在于HTTP请求头中的Host字段匹配与目录访问权限控制。Apache 2.4重构了虚拟主机路由机制,采用ServerName/ServerAlias驱动的名称匹配流程,并以Require指令替代旧版Order/Allow/Deny权限模型,显著提升安全性与语义清晰度。该机制依赖精确的配置加载顺序、正确的DocumentRoot路径声明及严格的文件系统权限协同。在Ubuntu 14.04 LTS(搭载Apache 2.4.7)环境中,常见故障如403 F 阅读详情

相关推荐

从斯坦福CS336课程看PyTorch核心原理与实战安装配置

深度学习框架是现代人工智能研究与工程实践的基石,其核心在于提供高效、灵活的张量计算与自动微分能力。PyTorch作为当前主流的动态图框架,以其直观的面向对象设计和动态计算图机制,极大地简化了复杂模型的构建与实验流程,成为大语言模型等前沿研究领域的首选工具。在工程实践中,PyTorch的价值体现在其完整的生态系统,包括用于视觉任务的Torchvision、用于简化训练流程的PyTorch Lightning,以及模型部署环节的TorchScript和ONNX工具链。要充分发挥其效能,关键在于理解其环境配置逻辑

weixin_33721427的博客 522

apache httpd sever在debian下的部署和配置以及最重要的常见漏洞解析

Nginx(发音同engine x)是一款由俄罗斯程序员Igor Sysoev所开发轻量级的网页服务器、反向代理服务器以及电子邮件(IMAP/POP3)代理服务器。起初是供俄国大型的门户网站及搜索引擎Rambler(俄语:Рамблер)使用。

qtttgeq的博客 1458

调整 Apache 服务器的最大连接数

调整 Apache 服务器的最大连接数可以帮助优化服务器性能,以处理更多的并发请求。在本文中,我将介绍如何设置 Apache 服务器的最大连接数。请注意,设置最大连接数时需要考虑服务器的硬件规格和可用资源。设置过高的最大连接数可能会导致服务器负载过高,影响性能。因此,在进行任何更改之前,请确保评估服务器的容量和需求。希望这个简单的指南能够帮助你调整 Apache 服务器的最大连接数。现在,你的服务器将能够处理更多的并发请求。取消注释并修改此行,将最大连接数设置为你希望的值。来保存文件,然后按下。

YbeCoder的博客 969

Ubuntu 配置 Apache

系统环境:Ubuntu 10.10(linux-kernel 2.6.35-22)安装版本:httpd-2.4.2.tar.gz(官方网址:Apache httpd)安装步骤:1、下载 httpd下载 httpd-2.4.2.tar.gz(官方网址:Apache httpd)2、解压 httpdtar -zxvf httpd-2.4.2.tar.gz3、安装 httpd进入解压后的目录cd htt

阳光岛主 1万+

C51单片机驱动ILI9341彩屏实战:从Proteus仿真到绘制自定义图案(附完整代码)

本文详细介绍了使用C51单片机驱动ILI9341彩屏的完整实战流程。内容涵盖硬件连接、8080并行接口时序模拟、寄存器初始化、屏幕方向设置以及基本图形绘制原理,并重点讲解了如何在Proteus仿真环境中搭建电路、调试代码,最终实现自定义图案的显示。文章提供了完整的代码示例,为嵌入式开发学习者和复古硬件爱好者提供了一套可行的解决方案。

rnn9storyteller的博客 511

主动式桥梁防船撞预警系统的方案汇总

本系统以精密光电测高前端(2台,上下游各1台)、固态雷达(2台,上下游各1台)、AIS(1台)、偏航辅助前端(4台,上下游各2台)为核心,通过人工智能,对画面上的船舶目标进行深度学习、精确定位,再用系统集成方法将各设备有机结合在一起,构建成套的桥梁防撞主动预警系统,全天候监控过往船舶。主动式桥梁防船撞预警系统主要船舶监测采集单元、控制单元、船舶超高、偏航信息检测单元、以及视频监控单元组成,,通过声光警示、短信文字、船舶身份识别及海事对讲频道、视频录像取证等多种手段与船舶进行信息互动,主动防止船舶碰撞桥梁!

gdxixun的博客 976

Ubuntu搭建Apache和PHP环境

一、软件安装 安装 Apache2: sudo apt-get install apache2 安装PHP模块: sudo apt-get install php5 安装Mysql sudo apt-get install mysql-server 其他模块安装: sudo apt-get install libapache2-mod-php5 sudo apt-get install...

青萍之末的博客 8588

小白跑WRF第五天,安装WPS和静态地理数据

小白跑WRF第四天,安装WPS一、WPS简介二、下载和安装WPSV4.0第一步、进入Build_WRF文件夹第二步、下载WPSV4.0第三步、解压WPS安装包第四步、修改intmath.f(必须执行)第五步、安装WPS三、修改namelist.wps 一、WPS简介 二、下载和安装WPSV4.0 第一步、进入Build_WRF文件夹 cd Build_WRF 第二步、下载WPSV4.0 下载WPSV4.0的安装包有以下三种方式: 利用Linux命令下载。 进入网站https://www2.mmm.uca

weixin_42372313的博客 2万+

apache httpd服务器403 forbidden的问题

一、问题描述 在apache2的httpd配置中,很多情况都会出现403。 刚安装好httpd服务,当然是不会有403的问题了。主要是修改了一些配置后出现,问题描述如下: 修改了DocumentRoot目录指向后,站点出现403错误。 设置了虚拟主机目录也可能导致403。 apache的httpd服务成功启动,看起来都很正常,却没有权限访问 日志出现: access to / ...

weixin_34061555的博客 1024

少儿学编程系列--使用递归画出龙形曲线DragonCurve

龙形曲线(Dragon Curve) 龙形曲线(Dragon Curve)又叫分形龙,是一种自相似碎形曲线的统称,因形似龙的蜿蜒盘曲而得名 使用黄金比例画龙形曲线 根据黄金比例画一条龙曲线。每次递归,第一步向左转32.89度,移动0.74倍原距离;第二个递归步骤向右转46.99度,移动原来距离的0.55倍。请查看这个网页(https://larryriddle.agnesscott.org/ifs/heighway/goldenDragon.htm)了解关于龙形黄线数学的细节 龙形曲线效果 .

penriver的博客 2298

《Zephyr OS 入门与实战》第3章:第一个 Zephyr 程序 - Blinky 实战

解决方法:确认设备树overlay文件已正确加载。返回值,确认驱动初始化状态。

2301_79143213的博客 540

Ubuntu/debian 配置apache2.4配置虚拟主机

最近想把web开发目录从/var/www/转移到/home/user/webroot目录,并配置基于域名的apache2虚拟主机,结果遇到各种403错误,非常郁闷。最终在Scrat同学的帮助下,终于找到问题所在,于是在此记录。 我使用的apache版本是Serverversion:Apache/2.4.6(Ubuntu),这是ubuntu安装的默认...

batistuta1977的博客 320

芯片研发完整全流程

芯片研发全流程可分为需求与架构设计、前端逻辑设计、后端物理设计、晶圆制造、封装测试五大阶段,涉及16个核心步骤。研发过程需要多学科交叉协作,包括微电子、物理、材料、计算机等。关键注意事项包括验证优先、工艺约束遵循、可测性设计等。芯片设计需要绘制纳米级精度的物理版图,而非传统工程图纸,需使用专业EDA工具而非KiCad这类PCB设计软件。完整研发流程具有高投入、高风险特点,需严格遵循行业标准和规范。

weixin_44520581的博客 233

Ubuntu Server 14.04 & Apache2.4 虚拟主机、模块重写、隐藏入口文件配置

环境:Ubuntu Server 14.04 , Apache2.4 一、Apache2.4 虚拟主机配置 01. 新建一份配置文件 在apache2.4中,虚拟主机的目录是通过/etc/apache2/sites-available中配置的,默认情况下,apache有一个默认的虚拟主机文件叫000-default.conf。我们将会复制000-default.conf文件...

weixin_30432179的博客 177

【RT-DETR改进涨点】ResNet18、34、50、101等多个版本移植到ultralytics仓库(RT-DETR官方一比一移植)

本文是本专栏的第一篇改进,我将RT-DETR官方版本中的ResNet18、ResNet34、ResNet50、ResNet101移植到ultralytics仓库,网上很多改进机制是将基础版本的也就是2015年发布的ResNet移植到ultralytics仓库中,但是其实RT-DETR实验的ResNet和其是有很大区别的在其中有很多细节上的不同(文章中我也会列出举例)

Snu77的博客 7222

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

ubuntu apache2.4.10

安装完apache2.4.10后,运行apache 提示如下错误: error while loading shared libraries: libpcre.so.1 找不到pcre的库文件: 解决办法: 安装pcre,我用的版本是 pcre-8.35 安装过程: 1 进入pcre-8.35目录   $./configure --prefix=/usr/local/prce 配置安

LEEY的专栏 499

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ubuntu20.04自带的apache2占用80端口

前言: 查看用法。在这里我们可以通过apachectl这个脚本(bash脚本),查看其控制的httpd在哪?1.先找到apache2whereis apache2即此apache用kill -9 kill不掉 需要改变其端口 修改配置文件 最后:/usr/sbin/apachectl start|stop|restart|graceful|graceful-stop|configtest|status|fullstatus|help 查看是否起来:ss -ntulp |grep 880 成

m0_59586152的博客 3061

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

apache2.4 创建虚拟主机

一定要看官方文档!!! 但是看了也没什么用,因为太复杂了看不懂!!! 但是依然要看一下,参考一下,注意百度上的结果大部分都是2.2的,买的书更老 我用的是debian系,其他也可以参考 http://httpd.apache.org/docs/current/vhosts/name-based.html 相关命令(很有用) 查看apache版本 apachectl -v 查看apache配置目录...

sspmii的博客 1334

Ubuntu环境下Apache服务器的搭建步骤

引言Apache HTTP服务器是世界上使用最广泛的Web服务器。它提供了许多强大的功能,包括动态可加载模块、强大的媒体支持以及与其他流行软件的广泛集成。在本教程中,将学习如何在的Ubuntu服务器上安装Apache Web服务器。

qq_57526628的博客 2227

如何修改apache的最大连接数

  在httpd.conf中设置:  MaxClients n  n是整数,表示最大连接数,取值范围在1和256之间,如果要让apache支持更多的连接数,那么需要修改源码中的httpd.h文件,把定义的HARD_SERVER_LIMIT值改大然后再编译。

ValiantWang的专栏 595

在ubuntu18中安装apache2.4、配置及使用

在ubuntu18中安装apache2.4、配置及使用主要内容适用范围==本教程主要用于ubuntu18中安装apache2.4==一、安装apache2.4二、安装模块(mod_wsgi)三、更新mod_wsgi.so四、配置站点文件(file_name.conf)五、权限六、apache2.4使用 主要内容 适用范围本教程主要用于ubuntu18中安装apache2.4 一、安装apache2...

hrj199036的博客 2881

如何解决Apache服务配置问题

为了使得Apache2服务器能够为Python应用提供服务,也是绞尽了脑子。首先在error.log中查看Apache现在启动的模块。AH00163: Apache/2.4.18 (Ubuntu) mod_jk/1.2.41 mod_wsgi/4.3.0 Python/3.5.2 configured -- resuming normal operations 这个时候可以看到Python版本以及w

Coding Corner 4570

Apache(Ubuntu)修改最大连接数

首先需要确定服务器httpd的工作模式呢,可通过执行 apachect2 -l 来查看:   可以看到有prefork.c,因此httpd是工作在prefork并发模式。 打开apache2的配置文件sudo vi /etc/apache2/apache2.conf apache2的并发控制模式,包括prefork和worker的部分修改为:   然后重启apache2...

sifeimeng的专栏 998
buzzmjx
博客等级 码龄15年 0粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值