/*******************************************************************************************
* Ubuntu 16.10 Apache PHP Server
* 说明:
* 需要用到16.10系统上装一个PHP的环境来做代码测试,记录一下几个关键的配置。
*
* 2017-2-27 深圳 南山平山村 曾剑锋
******************************************************************************************/ 一、参考文档:
. Apache提示You don't have permission to access / on this server问题解决
http://sjpsega.iteye.com/blog/1507439
. Multiple ports on Apache2
http://serverfault.com/questions/722493/multiple-ports-on-apache2 二、开启端口
/etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/-default.conf Listen <IfModule ssl_module>
Listen
</IfModule> <IfModule mod_gnutls.c>
Listen
</IfModule> listen # 开启独立的端口 # vim: syntax=apache ts= sw= sts= sr noet 三、配置路径
/etc/apache2/sites-available/-ARMDesktop.conf
<VirtualHost *:> # The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com ServerAdmin webmaster@localhost
DocumentRoot /home/zengjf/zengjf/zengjfos/ARMDesktop # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost> # vim: syntax=apache ts= sw= sts= sr noet 四、error:
. You don't have permission to access / on this server. . 解决办法:
/etc/apache2/apache2.conf
...
# 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> <Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory> <Directory /home/zengjf/zengjf/zengjfos/ARMDesktop>
Options Indexes FollowSymLinks
Require all granted
</Directory> #<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
...

Ubuntu 16.10 Apache PHP Server的更多相关文章

  1. 【转】在Ubuntu 16.10 Server 上部署 Moodle

    第一步 安装 Ubuntu 16.10 Server LTS Moodle 的官方文档肯定了Ubuntu Server LTS 是适合运维Moodle平台的. 1.使用纯代码交互的服务器Ubuntu更 ...

  2. [【转】ubuntu 16.10 Server 安装及基本部署

    一.Ubuntu Server 16.10 LTS 系统安装 Ubuntu 16.10 分为 桌面版 (desktop)和服务器版(Server).两者对于用户而言,最大的区别在于桌面版有图形操作界面 ...

  3. 喜讯!Ubuntu 16.10(Yakkety Yak) Final Beta发布喽!!!

    上月三十日,代号为"Yakkety Yak"的Ubuntu 16.10发行版本的Final Beta正式上线.Canonical的开发者Steve Langasek说道:" ...

  4. 在Ubuntu 16.10安装mysql workbench报未安装软件包 libpng12-0错误

    1.安装mysql workbench,提示未安装软件包 libpng12-0 下载了MySQL Workbench 6.3.8   在安装的时候报错: -1ubu1604-amd64.deb 提示: ...

  5. Ubuntu 16.10 安装KolourPaint 4画图工具

    KolourPaint 4画图工具简单实用,可以绘画.视频处理和图标编辑: • 绘画:绘制图表和“手绘” • 视频处理:编辑截图和照片;应用特效 • 图标编辑:绘画剪贴和标识透明化 1.在Ubuntu ...

  6. Ubuntu 16.10 中文环境 Shell输出英文提示

    /********************************************************************************** * Ubuntu 16.10 中 ...

  7. Ubuntu 16.10 server 相关

    1)安装图形化界面 sudo apt-get install xinit sudo apt-get install gnome 2)启用root账号 ① sudo passwd root ② 修改/e ...

  8. 在Ubuntu 16.10 安装 git 并上传代码至 git.oschina.net

    1. 注册一个账号和创建项目 先在git.oschina.net上注册一个账号和新建一个project ,如project name 是"myTest". 2.安装git sudo ...

  9. Ubuntu 16.10 安装byzanz截取动态效果图工具

    1.了解byzanz截取动态效果图工具 byzanz能制作文件小,清晰的GIF动态效果图,不足就是,目前只能通过输入命令方式来录制. byzanz主要的参数选项有: -d, --duration=SE ...

随机推荐

  1. 分布式计算开源框架Hadoop入门实践(二)

    其实参看Hadoop官方文档已经能够很容易配置分布式框架运行环境了,不过这里既然写了就再多写一点,同时有一些细节需要注意的也说明一下,其实也就是这些细节会让人摸索半天.Hadoop可以单机跑,也可以配 ...

  2. 【转】jQuery插件之ajaxFileUpload

    转自:http://www.cnblogs.com/kissdodog/archive/2012/12/15/2819025.html 说在前头,本文出自上面的作者,只是以前存的一些网址不见了,怕以后 ...

  3. rails generator

    generate 查找顺序 rails/generators/initializer/initializer_generator.rb generators/initializer/initializ ...

  4. 学习小程序第三天 WXML语言特性

    WXML语言特性     1.数据绑定   Musstache 语法 获取json中指定键值:变量名加双括号的绑定语法 如下: (1)绑定文本 注意所有组件和属性 都要小写 (2)绑定属性     ( ...

  5. json教程系列(2)-生成JSONObject的方法

    生成JSONObject一般有两种方式,通过javabean或者map类型来生成.如下面的例子:   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 ...

  6. JAVA中的Token 基于Token的身份验证

    最近在做项目开始,涉及到服务器与安卓之间的接口开发,在此开发过程中发现了安卓与一般浏览器不同,安卓在每次发送请求的时候并不会带上上一次请求的SessionId,导致服务器每次接收安卓发送的请求访问时都 ...

  7. JS 操作复制剪切粘贴

    测试了很多次之后,虽然有点细碎的突破,但还是想说,麻辣隔壁... 众所周知使用 oncut/oncopy/onpaste 监听剪切板,采用 window.clipboardData 并不是适用于大多浏 ...

  8. Qt事件机制---信号通过事件实现,事件可以过滤,事件更底层,事件是基础,信号是扩展。

    转:http://www.cnblogs.com/findumars/p/8001484.html Qt事件机制(是动作发生后,一种通知对象的消息,是被动与主动的总和.先处理自己队列中的消息,然后再处 ...

  9. 20145231《Java程序设计》第二次实验报告

    实验二 Java面向对象程序设计 实验内容 初步掌握单元测试和TDD: 理解并掌握面向对象三要素: 初步掌握UML建模: 熟悉S.O.L.I.D原则: 了解设计模式: 实验要求 实现并体会例子中代码的 ...

  10. C语言串口

    可以用open和fopen来打开文件,open偏底层,fopen来自于open更顶层.(根据公司某个项目看了源码用的open) #include <stdio.h>#include < ...