Nextcloud_server_well-known

Your web server is not properly set up to resolve “/.well-known/caldav”. _ Your web server is not properly set up to resolve “/.well-known/carddav”. add Redirect 301 /.well-known/carddav https://domain.com/nextcloud/remote.php/dav Redirect 301 /.well-known/caldav https://domain.com/nextcloud/remote.php/dav to nextcloud.conf Alias /nextcloud “/var/www/nextcloud/” <Directory /var/www/nextcloud/> Options +FollowSymlinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME …

目录下没有Index文件提示无访问权限

Apache默认在当前目录下没有index.html入口就会显示网站根目录,让网站目录文件都暴露在外面,是一件非常危险的事,例如:数据库密码泄露,隐藏页面暴露等严重安全问题! 进入apache的配置文件 $ sudo vi /etc/apache2/apache2.conf #Debian/Ubuntu systems $ sudo vi /etc/httpd/conf/httpd.conf #RHEL/CentOS systems Options Indexes FollowSymLinks 修改为: Options FollowSymLinks 修改后结果如下: <Directory “/var/www/html”> #    Options None #    Options Indexes FollowSymLinks Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> 其实就是将Indexes去掉,Indexes表示若当前目录没有index.html就会显示目录结构。 重启Apache服务器  /etc/init.d/httpd restart   https://blog.csdn.net/ithomer/article/details/50487296

隐藏apache2版本信息

To hide web server version number, server operating system details, installed Apache modules and more, open your Apache web server configuration file using your favorite editor: $ sudo vi /etc/apache2/apache2.conf #Debian/Ubuntu systems $ sudo vi /etc/httpd/conf/httpd.conf #RHEL/CentOS systems And add/modify/append the lines below: ServerTokens Prod ServerSignature Off Save the file, …

根据不同访问设备跳转到PC页面或手机页面

<script type=”text/javascript”> var userAgent = navigator.userAgent.toLowerCase(); var platform; if(userAgent == null || userAgent == ”){ platform = ‘WEB’ ; }else{ if(userAgent.indexOf(“android”) != -1 ){ platform = ‘ANDROID’; location.href = “http://m.kuegou.com/”; }else if(userAgent.indexOf(“ios”) != -1 || userAgent.indexOf(“iphone”) != -1 || userAgent.indexOf(“ipad”) != -1){ platform = ‘IOS’; location.href = “http://m.kuegou.com/”; }else if(userAgent.indexOf(“windows …