Debian 10 lighttpd+php

十六、Debian 10 WEB服务(lighttpd) 1 阅读详情

目录

一、题目要求

二、配置过程 

IspSrv

RouterSrv

AppSrv

StorageSrv

三、测试截图与评分要求

 测试:IspSrv

 评分要点:

 测试:IspSrv

 评分要点:


一、题目要求

WEB 服务

安装 lighttpd(使用其他 web 平台,以下功能均不得分);

启用 fastcgi-php 模块;

index.php 网页内容显示当前服务器的日期和时间(刷新页面时间自动更新);

二、配置过程 

IspSrv

1.安装Lighttpd服务

root@ispsrv:~# apt -y install lighttpd

2.安装PHP服务

root@ispsrv:~# apt install -y php7.3 php7.3-fpm php7.3-cgi

3.进去php配置文件

root@ispsrv:~# vim /etc/php/7.3/fpm/php.ini 

4.修改php配置文件

/cgi.fix	                      //查询
793 cgi.fix_pathinfo=1            //取消注释  793是行数

5.进入fastcgi-php文件:

root@ispsrv:~# vim /etc/lighttpd/conf-available/15-fastcgi-php.conf 

6.修改fastcgi-php文件

 9                 "socket" => "/var/run/php/php7.3-fam.sock",

7.开启fastcgi模块:

root@ispsrv:~# lighttpd-enable-mod fastcgi
root@ispsrv:~# lighttpd-enable-mod fastcgi-php

8.编写PHP的网页文件:

root@ispsrv:~# vim /var/www/html/index.php                     #网页文件路径

<?php
echo date("y-m-d h:i:s",time());
php?>

9.重启服务

root@ispsrv:~# systemctl restart php7.3-fpm.service 
root@ispsrv:~# systemctl restart lighttpd.service 

10.安装curl命令

root@ispsrv:~# apt -y install curl

11.打开防火墙的80端口

服务器的网页允许被访问
root@ispsrv:~#iptables -A INPUT -p tcp --dport 80 -j ACCEPT
root@ispsrv:~#iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT

客户端访问网页(自己访问自己也属于这个)
root@ispsrv:~#iptables -A INPUT -p tcp --sport 80 -j ACCEPT
root@ispsrv:~#iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT


root@ispsrv:~# netfilter-persistent save            #保存规则进配置文件

 

RouterSrv

1.打开防护墙的80端口

客户端访问网页
root@routersrv:~# iptables -A INPUT -p tcp --sport 80 -j ACCEPT
root@routersrv:~# iptables -A OUTPUT  -p tcp --dport 80 -j ACCEPT


打开转发表的80端口(让内网用户也可以访问外网的80端口)
root@routersrv:~# iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
root@routersrv:~# iptables -A FORWARD -p tcp --sport 80 -j ACCEPT


root@routersrv:~# netfilter-persistent save

 

AppSrv

1.打开防护墙的80端口

客户端访问网页
root@appsrv:~# iptables -A INPUT -p tcp --sport 80 -j ACCEPT
root@appsrv:~# iptables -A OUTPUT  -p tcp --dport 80 -j ACCEPT
root@appsrv:~# netfilter-persistent save 

 2.安装curl命令

root@appsrv:~# apt -y install curl

StorageSrv

客户端访问网页
root@storagesrv:~#  iptables -A INPUT -p tcp --sport 80 -j ACCEPT
root@storagesrv:~#  iptables -A OUTPUT  -p tcp --dport 80 -j ACCEPT
root@storagesrv:~#  netfilter-persistent save 

 2.安装curl命令

root@storagesrv:~# apt -y install curl

三、测试截图与评分要求

 测试:IspSrv

 评分要点:

 测试:IspSrv

 评分要点:

 

网页实时显示服务器时间和javscript自运行时钟 如果每秒通过ajax加载服务器时间的话,就会产生大量的请求,于是打算使用js 来解决这个需求 立即下载

相关推荐

ESP-IDF的安装及其在VScode中编译环境的搭建

从安装目录的\Espressif\frameworks\esp-idf-v5.3.2\examples路径中拷贝一个工程到项目中,比如拷贝\get-started下的hello_world文件夹。安装时可能会遇到如下问题,提示:"e:\ssc\software\ESP-IDF\v5.3.2\Espressif\tools\idf-python\3.11.2\python.exe -m pip" is not valid. (ERROR_INVALID_PIP)接着等待安装完成即可,其他步骤同方式1。

Freddy_Ssc的博客 4362

Debian10搭建Lighttpd+PHP

文章目录1、所需设备2、任务描述3、配置Lighttpd4、测试5、易错总结 1、所需设备 Debian10一台 IPaddress 192.168.1.1 netmask 255.255.255.0 Win10一台(可选) IPaddress 192.168.1.10 netmask 255.255.255.0 2、任务描述 安装Lighttpd 启用fastcgi-PHP模块 安装PHP index.php网页内显示当前服务器的日期和时间(刷新页面自动更新) 3、配置Lighttpd

Java学不会的博客 1320

Calibre电子书阅读器个性化样式定制指南

本文详细介绍了如何通过Calibre电子书阅读器的用户样式表功能进行深度个性化样式定制。从修改全局字体、行距、背景配色(包括深色/浅色模式)到美化代码块、引用等特殊元素,本指南提供了完整的CSS代码示例与实战技巧,帮助用户打造专属的舒适阅读环境,显著提升电子书阅读体验。

vv45678的博客 920

debian lighttpd php,安装Lighttpd与PHP5和MySQL支持Debian挤压

安装Lighttpd与PHP5和MySQL支持Debian SqueezeLighttpd是一款安全,快速,符合标准的Web服务器,专为速度至关重要的环境而设计。 本教程将介绍如何在具有PHP5支持(通过FastCGI)和MySQL支持的Debian Squeeze服务器上安装Lighttpd。我不会保证这将为您工作!1初步说明在本教程中,我使用IP地址为192.168.0.100的hostnam...

weixin_32880357的博客 243

3款主流AIGC模型部署方案对比:本地、云端与混合架构的成本与性能分析

本文对比分析了3种主流AIGC模型部署方案(本地、云端与混合架构)的成本与性能差异,帮助企业在预算、性能和维护复杂度之间找到最佳平衡点。通过实际案例和详细数据,展示了不同部署方式在延迟、扩展性、数据隐私等方面的优劣势,为技术决策者提供实用参考。

weixin_33158887的博客 370

硬件-电源-智能保护:eFuse选型与实战设计全攻略

本文深入解析eFuse在硬件电源设计中的关键作用与实战选型技巧。作为智能保护器件,eFuse能提供毫安级精度的过流保护、多重故障防护和智能恢复功能,比传统保险丝快1000倍以上。文章详细介绍了eFuse的工作原理、五大选型维度和PCB布局要点,帮助工程师有效预防电源异常导致的硬件损坏,适用于AI服务器、工业控制等场景。

weixin_30879169的博客 200

web服务器lighttpd 对php的支持

配置lighttpd支持php

ace_28的专栏 4090

实战干货|.NET9 C#上位机:多PLC并发通信+数据防丢+指令精准下发(10台设备实测+踩坑实录)

摘要:本文介绍了一个基于.NET9重构汽车零部件产线10台西门子S7-1200 PLC并发通信的工业级解决方案。针对原有系统存在的同步轮询阻塞、数据丢失、指令重复等问题,采用连接池复用、异步并发控制、超时隔离等技术,实现800ms内完成10台PLC并发采集、零丢包率、100%指令精准下发。方案通过.NET9的ThreadPool调度优化和ValueTask内存管理,将CPU占用控制在15%以内,解决了多PLC通信中的并发冲突、超时扩散等核心痛点,并提供了可直接复用的工业级代码实现。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 453

lighttpd上php的配置

首先用php-cgi -v看一下php是否支持fastcgi。在我的机器上的输出如下: PHP 5.2.4-2ubuntu5.1 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: May 9 2008 16:26:18)Copyright (c) 1997-2007 The PHP GroupZend Engine v2.2.0, Copyright (...

weixin_30653097的博客 899

史上最全!研究生科研必备科研工具(含AI科研工具),附使用说明和示例

这些工具在科研中的应用非常广泛,可以帮助研究生更高效地完成研究任务。为了更好地利用这些工具,建议深入学习它们的官方文档和教程,或者参加相关的工作坊和培训。

智能AI让学术科研更容易 3941

水文仿真软件:HEC-RAS (Hydrologic Engineering Center‘s River Analysis System)_(7).一维非稳态水力模型

自定义脚本是通过编程语言(如 Python)编写的一系列自动化任务,可以帮助用户更高效地处理数据和运行模型。编写脚本:使用 Python 或其他编程语言编写自定义脚本。集成脚本:将脚本集成到 HEC-RAS 中,实现自动化数据处理和模型运行。

kkchenjj的博客 929

lighttpd 配置 Php 环境

首先说明一下,版本很重要,因为不同的php,lighttpd,会有不同的结果;我这里先说明一下,我采用的版本。    php 5.1.6  lighttpd 1.4.2       eaccelerator-0.9.5.3(目前这个还没有安装成功)   1、安装php   #tar xjvf   php 5.1.6.bz2   #cd php 5.1.6   #./conf...

iteye_6020的博客 501

YOLO系列算法改进 | C3k2改进篇 | 融合DEConv细节增强卷积模块 | 细节增强+多分支差分卷积融合,标准卷积的完美涨点替代! | TIP 2024

YOLO系列算法改进 | C3k2改进篇 | 融合DEConv细节增强卷积模块 | 细节增强+多分支差分卷积融合,标准卷积的完美涨点替代! | TIP 2024 (以YOLO26最新目标检测模型为基础,融合C3k2_DEConv创新模块进行改进)

2502_91881744的博客 310

phpStudy for Linux (lnmp+lamp一键安装包) 符合國內

phpStudy for Linux (lnmp+lamp一键安装包) phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd,支持php5.2/5.3/5.4/5.5切换已经在centos-6.5,de...

weixin_30530523的博客 604

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

phpstudy安装

phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd,支持php5.2/5.3/5.4/5.5切换已经在centos-6.5,debian-7.4.,ubuntu-13.10测试成功使用说明:服务进程管理:phpstudy (start|stop|restart|uninstall)站点主机管理:phpstudy (add|del|list)ftpd...

zhzhl 339

深度学习工具包 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")

phpstudy.bin在线安装

phpStudy for Linux (lnmp+lamp一键安装包) phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd, 支持php5.2/5.3/5.4/5.5切换  已经在centos-6.5,de

十年砍柴的博客 1246

phpStudy for Linux (lnmp+lamp一键安装包)

phpStudy for Linux (lnmp+lamp一键安装包) phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd, 支持php5.2/5.3/5.4/5.5切换 已经在centos-6.5,de...

Web前端工程师 250

linux操作系统下快速安装配置php开发环境phpStudy for Linux

phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd,支持php5.2/5.3/5.4/5.5切换 已经在centos-6.5,debian-7.4.,ubuntu-13.10测试成功。下载版:http://lamp.phpstudy.net/phpstudy.bin完整版:http://lamp.phpstudy.net/phpstudy-all....

小虎哥-不可能变成可能 3772

在Ubuntu上安装PHPStudy组件

phpStudy for Linux (lnmp+lamp一键安装包) phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd,支持php5.2/5.3/5.4/5.5切换 ,已经在centos-...

337

lamp.phpstudy.net

phpStudy phpStudy » PHP教程 » phpStudy for Linux (lnmp+lamp一键安装包) phpStudy for Linux (lnmp+lamp一键安装包) phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 php...

ak47147258369的博客 219

Linux centos7一键安装lamp

phpStudy for Linux (lnmp+lamp一键安装包) phpStudy Linux版&Win版同步上线 支持Apache/Nginx/Tengine/Lighttpd/IIS7/8/6 phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd, 支持php5.2/5.3/5.4/5.5切换  已经在centos-6.5,de

断线的风筝 7525
上一篇: Debian 10 NTP 服务配置
下一篇: Debian 10 dhcp relay (dhcp 中继) dhcp 固定分配
活加梦
博客等级 码龄5年 18粉丝 8原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

活加梦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值