Apache没有目录权限的解决办法-You don't have permission to access / on this server.

Mac catalina下解决更改Apache服务DocumentRoot路径导致的403错误 写这篇文章呢,主要为了记录一下自己解决问题的过程,希望给后来者提供一些版主,少走一些弯路。顺便吐槽一下国内博客缺少实际操作、抄来抄去,误人匪浅的软件技术氛围。 为了php开发,启动了自己mac上的apache服务,版本是2.4.41(catalina版默认)。想把服务的基础目录变更到桌面下的www目录下,也是为了桌面上可视化编辑方便。于是打开/etc/apache2/httpd.conf文件(提示,各位修改下记得备份)。修改DocumentRoot为: 可重启服务之后,就出现了... 阅读详情

 虚拟主机(Virtual Host)是指在一个机器上运行多个网络站点 (比如:www.company1.com和www.company2.com)。 如果每个网络站点拥有不同的IP地址,则虚拟主机可以是"基于IP"的; 如果只有一个IP地址,也可以是"基于主机名"的, 其实现对最终用户是透明的。具体细节可以查看Apache官方说明 。

  一. “基于主机名”虚拟主机的配置

  Listen 81 
  NameVirtualHost *:81 
  <VirtualHost *:81 >
       ServerAdmin example@company.com
       DocumentRoot  yourRoot 
      <Directory "yourRoot ">
       Options FollowSymLinks
       AllowOverride None
       Order allow,deny
       Allow from all 
      </Directory>
  </VirtualHost>
 配置说明:

    81 : 为端口号,可以是其他现在系统未用的端口

    yourRoot : linux下格式形如: /export/www    注意最后没有"/"

 将上面的添加到apache的配置文件httpd.conf(linux下在/usr/local/apache2/conf/,视具体情况而定),然后重新启动Apache .

注意:

要配置基于主机名的虚拟主机,必须保留原有的80端口。

 二. 查看配置是否成功

   在浏览器中输入 http://localhost:81 查看是否配置成功。

 三. 常见问题常见解决方案

 当在浏览器中查看配置成功与否出现问题时,可优先到Apache官方网站的FAQ 上或用搜索引擎搜索你的问题。

  我这里就最常见403问题:

Forbidden

You don't have permission to access / on this server.

提供几种常见的解决方法:

  1.按上面的配置正确,特别是:

      Order allow,deny
       Allow from all

  2. 确保youRoot文件夹下有index.html文件(或名为index而后缀为其他形式(如.jsp .php等)的文件) ,因为Apache默认以index.html为网站首页,如果没有这个文件就会出现上面的403错误。

  注:如果你想以其他形式的文件(如:index.jsp或index.php等)作为出现的网页,可将Apache的配置文件中的:

   <IfModule dir_module>
       DirectoryIndex index.html
   </IfModule>
   改为(如你想用index.jsp):

   <IfModule dir_module>
       DirectoryIndex index.html index.jsp 
   </IfModule>

   如果需要浏览该文件夹下的内容,可以在</Directory>前添加:

    Options Indexes

  就可以了。
  3. 针对linux用户,windows或其他用户一般没这种情况。linux系统中一般会自带apache,在修改了配置文件后,最好到安装Apache的目录下重启Apache。

Apache提示You don‘t have permission to access / on this server问题解决 今天用apache配置虚拟主机的时候,出现下面的错误 首先配置文件httpd-vhosts.conf必须正确 <VirtualHost *:80> ServerAdmin yunan.hu@accenture.com DocumentRoot "C:\huyunan\lumen\public" ServerName www.php.com Se... 阅读详情

相关推荐

Apache服务器报错:拒绝访问,您没有权限访问服务器

如果您没有足够的权限来访问所请求的资源,服务器就会返回"拒绝访问"错误。当您在尝试访问一个Apache服务器时,有时候可能会遇到类似于"拒绝访问,您没有权限访问服务器"的错误提示。这个错误通常表示您正在尝试访问一个需要特定权限的资源,但您的访问被服务器拒绝了。如果您的服务器上运行着防火墙,并且该防火墙没有正确配置以允许Apache服务器的入站连接,那么您可能会遇到此问题。您需要根据您使用的防火墙软件来配置相应的规则以允许Apache的入站连接。配置错误:另一个常见的原因是Apache服务器的配置错误。

DpgrMl的博客 2817

Metasploit - auxiliary/gather/zoomeye_search

How to use ZoomEye API ?If you are a python developer, please view ZoomEye-SDK. If not, ZoomEye API Documentation is good for you.$ sudo easy_install zoomeye-SDKor$ sudo pip install git+https://github.

Nixawk 59万+

故障转移集群无法连接到节点_Windows 2012系统群集故障转移集群

理论知识很重要!集群和群集是什么意思?其实看到标题可能会感觉有点绕,简单易懂的来说一下:集群,英文名称为Cluster,集群的意思就是将多个系统连接在一起,可以让多台服务器能够像一台服务器那样工作。通常采用集群系统是为了提高系统的稳定性和网络中心的数据处理能力以及服务能力。第二个就是:群集,其实这个概念也不难理解,群集是把多个计算机连接在一起,形成整形,随后可以更好的利用设备资源的一项新...

weixin_39535283的博客 3266

网页报错:You don't have permission to access

当访问网站出现“You don't have permission to access / on this server.”时,造成此现象的原因大概有以下两点: 一:用户程序不完整,或者未在空间上设置首页,导致网站无法访问; 二:伪静态未开启,或用户的伪静态文件、伪静态规则不正确; 可根据以上提示查看代码或管理后台修改。 转载于:https://www.cnblogs.com/z...

dianling3902的博客 2万+

STM8库函数开发手册(3) //UART1、内部EEPROM、FLASH操作库、IIC(硬、软)

STM8S 微控制器家族的通用同步异步收发器(UART1,UART2 或者UART3)提供了一种灵活的方法与使用工业标准NRZ 异步串行数据格式的外部设备之间进行全双工数据交换。STM8 的UART 提供范围的波特率选择,并且支持多处理器通讯。UART 也支持LIN(局部互联网)协议版本1.3,2.0,和2.1 以及在主模式下的J2602。 UART1 和UAR...

finedayforu的博客 2527

基于 MATLAB 的综合能源系统建模案例 

电平衡约束:P_{gt}(t)+P_{grid}(t)-P_{eb}(t)-P_{load}(t)=0,其中 P_{grid}(t) 为与外部电网的交互功率(正表示购电,负表示售电)。- 电锅炉的热输出功率 Q_{eb} 与输入电功率 P_{eb} 的关系为:Q_{eb}=\eta_{eb}\times P_{eb},其中 \eta_{eb} 为电锅炉的热效率。- 燃气轮机的余热回收功率 Q_{gt} 与发电功率也存在一定关系,例如:Q_{gt}=c\times P_{gt},c 为余热回收比例系数。

qq_57128262的博客 1413

You don't have permission to access /nagios/ on this server

You don't have permission to access /nagios/ on this server  解决: chmod 777 nagios http://IP/nagios 出现欢迎界面  1、  其实这种错误就是提示你没有权限访问nagios这项服务。造成这种报错的原因有多种,可能是文件权限你没有改成777,也可能是你httpd.conf这个配

白及 5780

Langfuse实战:从评估打分到问题解决的完整指南

本文详细介绍了如何利用开源LLM工程平台Langfuse对AI应用进行系统性评估与优化。从创建评估数据集、设计自动化评分函数,到深入排查常见问题并关联Trace进行精准打分,提供了完整的实战指南。最后,探讨了如何利用评估结果驱动提示词迭代与A/B测试,并给出了生产环境部署与性能优化的关键考量,帮助开发者构建可测量、可分析、可改进的LLM应用。

backprop5master的博客 657

apache出现You don't have permission to access / on this server. 提示(解决方法)

今天在windows上搭建php环境,配置完成后,在浏览器中运行出现在You don't have permission to access / on this server.  提示。查了一下apache手册找到问题所在处。这里定义了默认对网站根的访问权限。 # Each directory to which Apache has access can be configured with

lunzi3775的博客 3751

Android Keymaster- 设备集成笔记 嵌入式

本文介绍了 Android Keymaster 的原理、使用方法和示例源代码。Android Keymaster 是一个重要的安全组件,为开发者提供了加密和解密功能,用于保护设备上存储的敏感数据。Android Keymaster 是 Android 系统的一个安全组件,用于保护设备上存储的敏感数据。Keymaster 使用基于硬件的密钥存储,同时提供了一组 API,让开发者可以在应用程序中使用这些加密功能。在嵌入式设备中,Android Keymaster 是一个重要的组件,用于提供加密和解密功能。

LrFortran的博客 673

保姆级教程:ABAP 通过 HTTP POST 调用 OData 服务创建业务数据的具体例子

笔者之前的文章发布之后,有朋友在评论区留言,询问 ABAP 除了 Web Service 之外,是否也支持 HTTP 呢?ABAP 这么强大的语言,支持 HTTP 当然不在话下。网上有很多在 ABAP 系统基于 CL_HTTP_CLIENT 工具类,通过 HTTP 协议和第三方系统交互的代码例子。本文介绍笔者项目中一个实际例子,实现的是在 ABAP 系统 A 通过 HTTP 调用 OData 服务,在 ABAP 系统 B 创建业务数据的需求。下面我们按照这个套路来一步步实现。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 718

Apache提示You don't have permission to access / on this server问题解决

Apache提示You don’t have permission to access / on this server问题解决 测试时遇到将一本地目录设置为一apache的虚拟主机,在httpd-vhosts.conf文件中进行简单设置,然后在hosts文件中将访问地址指向本地,启动apache,进行访问,却出现了You don’t have permission to access / on ...

mxl00z的博客 15万+

知识图谱-KGE-语义匹配-双线性模型-2018:SimplE

【paper】 SimplE Embedding for Link Prediction in Knowledge Graphs 【简介】 本文是加拿大英属哥伦比亚大学的两位学者发表在 NIPS 2018 上的工作,文章提出了 SimplE(Simple Embedding)。这篇和前面一篇差不多,也是对 1927 年的 CP 进行改进(简化),传统CP为实体分配的两个向量是独立训练的,SimplE利用关系的逆在三元组打分函数中加上了一个对称项,使得每个实体的两个向量依赖学习,并且 SimplE 的复杂度随

u013250861的博客 970

Forbidden You don't have permission to access / on this server.

Forbidden You don't have permission to access / on this server. 当出现此问题的时候,记得修改httpd.conf。 在原有的位置文件中找到配置节     Options FollowSymLinks     AllowOverride None     Order deny,allow

在路上 — on the way 1万+

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

you don't have permission to access / on this server(Apache Server权限访问问题)

Apache Http Server已经在linux上安装完成,可是通过浏览器访问,却出现了“you dont have permission to access / on this server”.到网上Google了下,大致有以下2种解决办法:1.在httpd.conf文件中,有这么一段 Options FollowSymLinks AllowOverride None Order

Benjieming_Wang的专栏 5万+

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

Apache: You don't have permission to access / on this server

三. 常见问题常见解决方案  当在浏览器中查看配置成功与否出现问题时,可优先到Apache官方网站的FAQ 上或用搜索引擎搜索你的问题。   我这里就最常见403问题: Forbidden You don't have permission to access / on this server. 提供几种常见的解决方法:   1.按上面的配置正确,特别是:       Order

a1079540945的专栏 1万+

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

apache 提示You don't have permission to access /test.php on this server.怎样解决

今天客户遇到了一个问题,那就是在访问www.xxxx.com网站的时候能够正常访问,可是如果去掉前面www就不能访问了.在网 上大量的寻找答案,几乎都是在说Apache网站权限的问题,可是权限也都给了还是不能访问,依旧报错,开始按照网上的答案 进行测试如下: 首先找到Apache主配置文件加载启动重定向模块: [root@php-application ~]# vim /usr/loc...

BLXH-AS 4万+

You don't have permission to access / on this server.

Forbidden You don't have permission to access / on this server. 搭建好apache服务器后,使用Apache基于域名虚拟主机配置 但是总是报错 You don't have permission to access / on this server. 总结一下,万能网友的处理方案 方案1. vi /usr/local...

weixin_38917807的博客 1360

Apache出现 You don't have permission to access /phpmyadmin/ on this server. 解决办法

在 CentOS5.3 + MySQL 5.0.45 + Apache2.2.3 + PHP5.1.6(都是系统自带的)中运行PHP程序出错。 装好 apache+php+mysql 后,拷贝(tar / mv )一份 phpmyadmin 过后运行出错: You don’t have permission to access / on this server 有人说把selinux关掉就好

shangzwz的专栏 4439

apache 之 you don't have permission to access / on this server linux 下 错误解决方法

<br /> you don't have permission to access / on this server(Apache Server权限访问问题) <br />Apache Http Server已经在linux上安装完成,可是通过浏览器访问,却出现了“you don't have permission to access / on this server”.<br />1.在httpd.conf文件中,有这么一段<br /><Directory/> # 这里的目录为自己的目录<br />Op

namesliu 刘林 的专栏 8002

apache问题you don't have permission to access / on this server如何解决

项目部署到Apache Http Server上面,通过apachectl -t 检测配置文件也没有问题。可是通过浏览器访问,却出现了“you don't have permission to access / on this server”.  1、首先,查看conf.d/python.conf文件         Options Indexes FollowSymLinks

CDSN大帝的专栏 1318

Apache提示You don't have permission to access / on this server 解决

Apache提示You don’t have permission to access / on this server 解决 网上好多解决方案 将"Require all denied"修改成"Require all granted"; 等等 试了所有的都没解决我的问题 建议针对/private/var/log/apache2/中error来看 [Sun Jun 02 18:00:37.7608...

Niu_Eva的博客 1万+
上一篇: ThinkPHP的自定义常量和系统常量的使用
下一篇: Thinkphp的A,R,M,D方法区别
宇宙第一帅
博客等级 码龄12年 22粉丝 147原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址