我运行一个本地的Ubuntu服务器作为我的云。 这台机器可以通过我的路由器portforwarding从外面到达。 这工作正常(通过IP)。 现在,我在现有的1und1域中创build了一个子域,并使用“域redirect”将此子域xxx.mydomain.comredirect到具有端口的外部(静态)IP,如下所示: https://ip.ip。 ip.ip:2000 / nextcloud这也工作正常(但在地址栏中inputIP,而不是xxx.mydomain.com),但标准的ubuntu SSL证书显然是不值得信赖的。 这就是为什么我从comodo为我的子域名买了一个便宜的SSL证书:xxx.mydomain.com然后我将证书导入到我的Ubuntu服务器(/ etc / ssl / certs …),并更正了/ etc / apache2 / availabe / nextcloud.conf(SSLCertificateFile和SSLCertificateKeyFile)。 这(在apache2重新启动之后)导致浏览器在浏览到xxx.mydomain.com时读取Comodo SSL证书。 问题 :Comodo Cert仍然不可信(网站证书链存在问题(net :: ERR_CERT_COMMON_NAME_INVALID)。) 这与redirect过程有关吗? 如果是的话,我该如何解决呢? 还是我错过了别的? 提前致谢! €dit:这是nextcloud.conf文件: Alias /nextcloud "/var/www/nextcloud/" <VirtualHost *:443> ServerName cloud.myDomain.com DocumentRoot /var/www/nextcloud SSLEngine on SSLCertificateKeyFile /etc/ssl/private/myComodo.key SSLCertificateFile /etc/ssl/certs/myComodo.crt SSLCertificateChainFile /etc/ssl/certs/myComodo.ca-bundle </VirtualHost> <Directory /var/www/nextcloud/> […]
我目前在Fedora 25 Server Edition x86_64上使用Nginx 1.10.2来托pipe一些小的静态网站。 我已经configurationNginx假定没有文件扩展名的请求( try_files )为.html ,并且如果.*\.html被请求,则redirect(永久rewrite )到URL的.html -less版本。 我也有自定义错误页面。 据我可以告诉到目前为止, error_page指令不配合重写,因为我被卡住redirect循环的网页,应该返回一个正常的错误信息…我相信这是所有相关的configuration: server { […] try_files $uri $uri.html $uri/index.html =404; error_page 400 /errors/400.html; error_page 401 /errors/401.html; error_page 403 /errors/403.html; error_page 404 /errors/404.html; error_page 408 /errors/408.html; error_page 500 /errors/500.html; error_page 503 /errors/503.html; # Remove "index" from URL if requesting the front page. rewrite […]
我有一个域名example.com。 当进入example.com我想代理请求到127.0.0.1:8080/source 我的nginxconfiguration location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:8080; } 这适用于127.0.0.1:8080,但我不能让它代理到/源子目录。 当我改变 proxy_pass http://127.0.0.1:8080/source/; 它不能正常工作。 它redirect到http://127.0.0.1:8080/source/ ,但是js和css文件path是/source/js/ *.js和/source/css/ *.css ,其他资源文件是/source/* 。 例如,当浏览器加载html时,它会尝试查找/source/js/ *.js ,因为我redirect到http://127.0.0.1:8080/source/ ,最终path是http://127.0.0.1:8080/source/source/js/ *.js ,但正确的path是http://127.0.0.1:8080/source/js/ *.js 我只是想当我进入example.com ,它将redirect到http://127.0.0.1:8080/source/ ,或者redirect到example.com/source也没关系。
我一直在尝试使用URL重写将URLredirect到另一个域。 以下是我的nginx.conf文件: worker_processes 1; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; server { listen 8070; server_name www.example.com; rewrite ^/v1/([0-9]+).html http://www.example.com/v1?exid=$1; location ~ /v1/([0-9]+) { return 301 http://dev.example1.com/v1?exid==$1; } } } 我一直在尝试很长一段时间,但我仍然无法find合适的解决scheme。 注:我没有得到任何错误,如果我尝试以上,但预期的redirect不会发生。 我希望将此urlredirect到http://example.com/v1/68740.html —至—> http://dev.example1.com/v1?exid=68740 。 提前致谢。
有5个用户在SBS 2008R2上运行域的小公司。 个人电脑都运行Windows 10。 我们已经启用了多年的文件夹redirectfunction,最近我的一个用户(Sandra)在当天login时无法访问她的桌面。 错误“…没有权限访问\ NAS \用户名\桌面…” 其他人都很好。 尝试使用她的电脑作为另一个用户login – 没有问题。 桌面被重新创build,因为它应该。 移动到不同的电脑,并login为桑德拉 – 惊喜! 访问redirect的桌面没有问题。 为什么当另一台电脑没有时,一台PC会声称有权限错误? 你的沮丧, 加里
我在CentOS 7 Linux上运行一个embedded在Wordpress / Jetty后面的HAProxy 1.5网页游戏。 该网站可以作为http和https访问。 我已经修改WordPress的显示播放器configuration文件页面的url如下所示: https://slova.de/player-12345 其中12345是我的网页游戏中的数字播放器ID。 这工作得很好,但我想简化上面的url https://slova.de/12345 然后使用HAProxy 将“player-”部分预先设置为仅限数字的path 。 所以我已经添加到/etc/haproxy/haproxy.cfg文件的行: http-request redirect code 301 prefix /player- if { path_end /5 } 但是,由于某些原因,导致url不完整: https://slova.de/player-/player-/player-/player-/player-/player-/player-/player-/player-/player-/player-/player-/player-/player-/播放器- /播放器- /播放器- /播放器- /播放器- /播放器- /播放器- / 5 下面是我完整的haproxy.cfg文件来提供更多的上下文: global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon stats socket […]
我想要以下redirect发生: http://www.example.org – > https://example.org [working] https://www.example.org – > https://example.org [不工作] 正如您在使用“https”时可以看到的那样,它不会redirect到https://example.org,而只是停留在https://www.example.org 我的www.conf(www.example.org): <VirtualHost *:80> ServerName www.example.org Redirect / https://example.org ServerAdmin webmaster@localhost DocumentRoot /srv/www ErrorLog ${APACHE_LOG_DIR}/www_error.log CustomLog ${APACHE_LOG_DIR}/www_access.log combined </VirtualHost> <VirtualHost *:443> ServerName www.example.org Redirect / https://example.org ServerAdmin webmaster@localhost DocumentRoot /srv/www ErrorLog ${APACHE_LOG_DIR}/www_ssl_error.log CustomLog ${APACHE_LOG_DIR}/www_ssl_access.log combined Include /etc/letsencrypt/certbot.conf </VirtualHost> 我的main.conf(例如.org): <VirtualHost *:80> ServerName example.org Redirect […]
我试图绕开SPA(即JavaScript呈现的页面)不能提供twitter元数据和元数据必须是服务器html页面的一部分的事实。 有许多适当的解决scheme,像服务器端渲染这个问题,但我正在寻找一个更快的方式,因为我想这只是由3个不同的网站服务的页面。 我想要达到的是: http://example.com =>通常服务于index.html(index.html具有硬编码的元标题标签) http://example.com/accept服务于index.html,但通过sub_filter的用法代替meta标签,在那里接受单词accept http://example.com/reject提供index.html,但通过使用sub_filterreplacemeta标签,在那里有拒绝 我尝试使用不同的位置,如: location / { try_files $uri /index.html; } location /accept { sub_filter 'normal' 'accept'; sub_filter_once off; try_files $uri /index.html; } 但我得到了正常的meta标签index.html。 如果我移动/位置的sub_filter然后stringreplace工程虽然。 还尝试重写,如果内部位置等,但无法得到它的工作。
我有一个ELB后面的IIS Web服务器。 Web服务器使用安全cookie在会话期间保持用户login。 我有用于将HTTPredirect到HTTPS的CloudFront。 如果我直接使用自己的DNS名称访问ELB,一切工作正常。 但是,如果我使用“www.eyecloud.net.au”访问CloudFront,login后会一直弹回login页面。 这是我第一次使用CloudFront。 什么地方出了错?
我有一个nginx docker,运行着多个 site-config文件。 其中之一就是所有http连接的一般redirecthttps: server { listen 80; server_name *.example.com example.com; return 301 https://$host$request_uri; } 所有其他的site-config文件是为我的其他docker/服务如Nextcloud和Plex。 每当我把例如https://plex.example.cominput到我select的浏览器(甚至是IE)中时,它都会显示正确的网页,并显示一个ssh-connection。 但是,inputhttp://plex.example.com只会返回一个空白页面,在这种情况下不会将我redirect到Plex。 任何人有一个想法? PS:默认的site-config文件是空的。 但是由于这样的事实,所有的服务/docker工人的site-configs工作,我猜测,redirect在一个额外的文件不会是问题。 PPS:这是一个访问日志的例子。 错误日志是空的(超过3个月没有新的条目)。 日志是通过https访问我的plex服务器。 通过http访问任何内容都不会创build日志条目。 192.168.0.2 – – [13/Nov/2017:21:53:02 +0100] "GET / HTTP/1.1" 401 157 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" 192.168.0.2 – – [13/Nov/2017:21:53:02 +0100] "GET /web/index.html HTTP/1.1" 200 1650 […]