Windows10搭建个owncloud+内网穿透
下载
下载安装Wampserver
安装即用,一直点下一步就行了。
官方下载地址
我下载的是wampserver3.1.7_x64
下载owncloud
https://mp.csdn.net/console/upDetailed
我下载的是owncloud-8.0.16
安装Wampserver后
双击运行
左键点开点phpMyAdmin
直接点执行
修改权限---修改密码
创建数据库,然后退出
PHP版本选择5.6.40
右键点击---tools
在Apache里add a listen port for apache
比如说8081
解压owncloud放在以下图片这个www文件夹下
左键点击
左键点击程序
点VirtualHost Management
第二个是上面owncloud的路径
重启所有服务
接下来会遇到一些报错和解决的方法
红框部分是写自己路由器的公网ip,注意格式不要忘记最后的逗号
内网穿透和可能出现的问题
找到自己的公网ip是多少,然后在app或者192.168.1.1上面设置虚拟服务器的端口映射。
这里就不写了。参考(https://wangejiba.com/4369.html)
内部端口8081,外部端口随便设,ip就是自己机器的ip,一般都是192.168.1.2-192.168.1.254里的一个地址。
然后在游览器上 公网ip:8081
可能会出现以下报错
You don't have permission to access / on this server
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
修改为:
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options FollowSymLinks
AllowOverride none
Require all granted
</Directory>
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options +Indexes +FollowSymLinks +Multiviews
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
# AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
# Require local
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
修改为
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
只改Directory中间的内容
在httpd-vhosts里8081的内容全部注释掉,或者删掉
验证
找台外网的机器,公网ip+8081看能不能出现owncloud的界面
参考
https://blog.csdn.net/a1344714150/article/details/95341261
https://jingyan.baidu.com/article/eae07827798a661fec54850f.html