tag:forum.selfhtml.org,2005:/self Alias Nginx-Proxy vs. Apache2 Alias – SELFHTML-Forum 2019-12-12T10:49:02Z https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761434#m1761434 Simone https://www.raetsel-hilfe.de/ 2019-12-11T09:28:37Z 2019-12-11T09:28:37Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hi,</p> <p>Ich bin dabei mir einen (Web-Entwicklung) Nginx(als http2-Proxy) + Apache2 Server aufzusetzen.</p> <p>Wie bekomme ich das hin das Apache Alias Module ohne Anpassung der Nginx Conf korrekt eingebunden werden?</p> <p>Beispiel:</p> <pre><code class="block"># apachectl -M | grep autoindex autoindex_module (shared) # apachectl -M | grep alias alias_module (shared) vhost_alias_module (shared) </code></pre> <p>-> Autoindex + Alias Module sind "aktiv"</p> <p>#cat /etc/apache2/mods-available/alias.conf</p> <pre><code class="block"><IfModule alias_module> # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn't aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If # you do not use FancyIndexing, you may comment this out. Alias /icons/ "/usr/share/apache2/icons/" <Directory "/usr/share/apache2/icons"> Options FollowSymlinks AllowOverride None Require all granted </Directory> </IfModule> </code></pre> <p>Und genau diese "geladenen" Regel:</p> <p>Alias /icons/ "/usr/share/apache2/icons/"</p> <p>funktioniert so nicht!</p> <p><a href="/images/6490a174-1bf7-11ea-a978-b42e9947ef30.png" rel="noopener noreferrer"><img src="/images/6490a174-1bf7-11ea-a978-b42e9947ef30.png?size=medium" alt="" loading="lazy"></a></p> <p>Natürlich funktioniert die ganze Sache wenn ich in der Nginx Conf die Regel festlege.</p> <pre><code class="block"> #Alias /icons/ "/usr/share/apache2/icons/" location ~ ^/icons/.* { root /usr/share/apache2/; } </code></pre> <p><a href="/images/58292456-1bf7-11ea-ac30-b42e9947ef30.png" rel="noopener noreferrer"><img src="/images/58292456-1bf7-11ea-ac30-b42e9947ef30.png?size=medium" alt="" loading="lazy"></a></p> <p>Gibt es einen Trick um den Alias vom Apache2 nutzen zu können.</p> <p>Danke</p> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761439#m1761439 TS ts-self@online.de https://bitworks.de 2019-12-11T14:12:06Z 2019-12-11T14:12:06Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hello,</p> <p>ich habe zwar nicht eindeutig verstanden, was Du wünschst, aber nach meiner momentanen Interpretation könnte Dir <a href="https://support.hypernode.com/knowledgebase/create-reusable-config-for-custom-snippets/" rel="nofollow noopener noreferrer">diese Vorgehensweise</a> vielleicht helfen?</p> <p>Glück Auf<br> Tom vom Berg</p> <div class="signature">-- <br> Es gibt nichts Gutes, außer man tut es!<br> Das Leben selbst ist der Sinn. </div> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761442#m1761442 Simone https://www.raetsel-hilfe.de/ 2019-12-11T14:53:10Z 2019-12-11T14:53:10Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hi Tom,</p> <p>ist vielleicht auch etwas "tricky" von mir ausgedrückt.</p> <p>Ich versuche es nochmal besser:</p> <p>Der Alias sagt ja z.B.: das sich das Bild image2.gif nicht im Stammverzeichnis befindet sondern an einer anderen Stelle auf dem Server und von dort geladen werden soll. Diese Regel wird in der /etc/apache2/mods-available/alias.conf formuliert.</p> <pre><code class="block">Alias /icons/ "/usr/share/apache2/icons/" </code></pre> <p>Leider kennt der Proxy diese Regel nicht ... und erzeugt somit eine 404 für das Bild image2.gif</p> <p>es sei denn ich formuliere einen Alias in der Nginx-Proxy-conf</p> <pre><code class="block"> #Alias /icons/ "/usr/share/apache2/icons/" location ~ ^/icons/.* { root /usr/share/apache2/; } </code></pre> <p>durch diese Regel wird das entsprechende Bild angesprochen</p> <pre><code class="block">2019/12/11 15:31:59 [debug] 1791#1791: *486 http filename: "/usr/share/apache2/icons/image2.gif" </code></pre> <p>Ziel sollte sein das der mods-available Alias dem Nginx-Proxy den korrekten Bild-Path weitergibt.</p> <p>Mir ist nicht bekannt ob das überhaupt möglich ist.</p> <pre><code class="block">2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Host: webserver.test" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Connection: keep-alive" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Cache-Control: max-age=0" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Upgrade-Insecure-Requests: 1" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Referer: http://webserver.test/img/" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Accept-Encoding: gzip, deflate" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "Cookie: io=w-quB5IH0D_WiLSaAAAC" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "If-None-Match: "419fa618-135"" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header: "If-Modified-Since: Sat, 20 Nov 2004 20:16:24 GMT" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http header done 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 0 2019/12/11 15:32:39 [debug] 1791#1791: *486 rewrite phase: 1 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script var 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script var: "GET" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script value: "OPTIONS" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script equal 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script equal: no 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script if 2019/12/11 15:32:39 [debug] 1791#1791: *486 http script if: false 2019/12/11 15:32:39 [debug] 1791#1791: *486 test location: "/" 2019/12/11 15:32:39 [debug] 1791#1791: *486 test location: ~ "^/icons/.*" 2019/12/11 15:32:39 [debug] 1791#1791: *486 using configuration "^/icons/.*" 2019/12/11 15:32:39 [debug] 1791#1791: *486 http cl:-1 max:1048576 2019/12/11 15:32:39 [debug] 1791#1791: *486 rewrite phase: 3 2019/12/11 15:32:39 [debug] 1791#1791: *486 post rewrite phase: 4 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 5 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 6 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 7 2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 8 2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 9 2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 10 2019/12/11 15:32:39 [debug] 1791#1791: *486 access phase: 11 2019/12/11 15:32:39 [debug] 1791#1791: *486 post access phase: 12 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 13 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 14 2019/12/11 15:32:39 [debug] 1791#1791: *486 generic phase: 15 2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 16 2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 17 2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 18 2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 19 2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 20 2019/12/11 15:32:39 [debug] 1791#1791: *486 content phase: 21 2019/12/11 15:32:39 [debug] 1791#1791: *486 http filename: "/usr/share/apache2/icons/image2.gif" 2019/12/11 15:32:39 [debug] 1791#1791: *486 add cleanup: 00005577ED489D50 2019/12/11 15:32:39 [debug] 1791#1791: *486 http static fd: 14 2019/12/11 15:32:39 [debug] 1791#1791: *486 http set discard body 2019/12/11 15:32:39 [debug] 1791#1791: *486 http ims:1100981784 lm:1100981784 2019/12/11 15:32:39 [debug] 1791#1791: *486 http im:""419fa618-135"" etag:"419fa618-135" </code></pre> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761445#m1761445 TS ts-self@online.de https://bitworks.de 2019-12-11T15:29:09Z 2019-12-11T15:29:09Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hello Simone,</p> <p>ich bin ja 'n bisschen blöd: was hat der NGINX-Proxy mit der inneren Dateiorganisation des Apache-Webservers zu tun?</p> <p>Ich gehe davon aus, dass es sich hier um zwei separate Hosts handelt, oder lässt Du einen NGINX <strong>und</strong> einen Apachen auf demselben Host laufen?</p> <p>Glück Auf<br> Tom vom Berg</p> <div class="signature">-- <br> Es gibt nichts Gutes, außer man tut es!<br> Das Leben selbst ist der Sinn. </div> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761446#m1761446 Simone https://www.raetsel-hilfe.de/ 2019-12-11T15:41:53Z 2019-12-11T15:41:53Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hm, @NGINX und einen Apachen auf demselben Host laufen?</p> <p>genau so funktioniert ein "Reverse Proxy" für das http2 Protokoll</p> <p><a href="https://www.howtoforge.de/anleitung/so-installieren-sie-nginx-als-reverse-proxy-fr-apache-unter-ubuntu-1604/" rel="nofollow noopener noreferrer">https://www.howtoforge.de/anleitung/so-installieren-sie-nginx-als-reverse-proxy-fr-apache-unter-ubuntu-1604/</a></p> <p><a href="https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-16-04-server" rel="nofollow noopener noreferrer">https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-16-04-server</a></p> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761449#m1761449 TS ts-self@online.de https://bitworks.de 2019-12-11T15:54:51Z 2019-12-11T16:33:30Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hello Simone,</p> <p>Du hast auch bestimmt beide Server auf <strong>unterschiedliche</strong> Ports lauschen lassen und bei der Proxy-Umleitung auch daran gedacht, dass der Zielport der des Apachen sein muss? Sonst befragt der Proxy nämlich seine eigene DocumentRoot, was zu dem von Dir beschriebenen Effekt führen könnte.</p> <pre><code class="block language-bash">server <span class="token punctuation">{</span> listen <span class="token number">80</span> default_server<span class="token punctuation">;</span> listen <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:80 default_server<span class="token punctuation">;</span> root /var/www/html<span class="token punctuation">;</span> <span class="token comment"># Add index.php to the list if you are using PHP</span> index index.html index.htm index.nginx-debian.html<span class="token punctuation">;</span> server_name _<span class="token punctuation">;</span> location / <span class="token punctuation">{</span> proxy_pass http://localhost:8000<span class="token punctuation">;</span> include /etc/nginx/proxy_params<span class="token punctuation">;</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span> </code></pre> <p>Beachte die Zeile <code>proxy_pass http://localhost:8000;</code></p> <p>Und wenn Du das alles beachtet hast, teste zuerst den Apachen <em>ohne</em> Proxy. Frage also direct <code>localhost:8000/icons</code>ab.</p> <p>Glück Auf<br> Tom vom Berg</p> <div class="signature">-- <br> Es gibt nichts Gutes, außer man tut es!<br> Das Leben selbst ist der Sinn. </div> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761454#m1761454 Simone https://www.raetsel-hilfe.de/ 2019-12-11T17:01:23Z 2019-12-11T17:01:23Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hi,</p> <p>Danke für Dein Feedback!</p> <p>Der Proxy läuft und antwortet korrekt</p> <pre><code class="block">Request URL: http://192.168.4.1:9090/icons/image2.gif Request Method: GET Status Code: 200 OK Remote Address: 192.168.4.1:9090 Referrer Policy: no-referrer-when-downgrade Accept-Ranges: bytes Connection: Keep-Alive Content-Length: 309 Content-Type: image/gif Date: Wed, 11 Dec 2019 16:54:03 GMT ETag: "135-3e9564c23b600" Keep-Alive: timeout=5, max=100 Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT Server: Apache/2.4.38 (Debian) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3 Accept-Encoding: gzip, deflate Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 Cache-Control: no-cache Connection: keep-alive Host: 192.168.4.1:9090 Pragma: no-cache Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1 </code></pre> <p>Meine Ng-conf sieht so aus</p> <pre><code class="block"> map $http_origin $cors_origin_header { default ""; "~(^|^http:\/\/)(localhost$|localhost:[0-9]{1,4}$)" "$http_origin"; "https://webserver.test" "$http_origin"; } map $http_origin $cors_cred { default ""; "~(^|^http:\/\/)(localhost$|localhost:[0-9]{1,4}$)" "true"; "https://webserver.test" "true"; } # Expires map map $sent_http_content_type $expires { default off; text/html epoch; text/css max; application/javascript max; ~image/ max; } #server_tokens off; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; proxy_pass_header Server; server { gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; listen 80; listen 443 ssl http2; server_name ~^(www\.)?(?<domain>.+)$; error_log /home/web/www/html/webserver.test/nginx/error_log.log debug; access_log /home/web/www/html/webserver.test/nginx/access_log.log combined; root /home/web/www/html/$domain/dist; index index.php index.htm index.html; ssl_certificate /home/web/www/html/webserver.test/ssl/webserver.test+1.pem; ssl_certificate_key /home/web/www/html/webserver.test/ssl/webserver.test+1-key.pem; ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:MEDIUM:!aNULL:!MD5; add_header Access-Control-Allow-Origin $cors_origin_header always; add_header Access-Control-Allow-Credentials $cors_cred; add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD"; add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept"; if ($request_method = 'OPTIONS') { return 204 no-content; } #Alias /icons/ "/usr/share/apache2/icons/" location ~ ^/icons/.* { root /usr/share/apache2/; } location / { try_files $uri @proxy; } location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { add_header X-Test-header static; } location ~ \.php$ { proxy_pass http://192.168.4.1:9090; include /etc/nginx/proxy_params; add_header X-Test-header php; } location @proxy { proxy_pass http://192.168.4.1:9090; include /etc/nginx/proxy_params; add_header X-Test-header proxy; } location ~ /\.ht { deny all; } expires $expires; } </code></pre> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761455#m1761455 Simone https://www.raetsel-hilfe.de/ 2019-12-11T17:08:41Z 2019-12-11T17:08:41Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hi,</p> <p>Der URL-Aufruf:</p> <p>http://localhost:9090/icons/image2.gif</p> <p>führt zu einer Nichterreichbarkeit !</p> <p>Ich habe versucht die Apache conf dynamisch zu halten</p> <pre><code class="block"><VirtualHost *:9090> VirtualDocumentRoot /home/web/www/html/%0/dist/ ServerName %0 LogFormat "%V (Intranet host: %h) %{X-Forwarded-For}i %l %u %t \"%r\" %s %b" vcommon CustomLog /var/log/apache2/access.log vcommon <Directory "/home/web/www/html/*/dist"> Options Indexes FollowSymLinks MultiViews AllowOverride all Require all granted </Directory> </VirtualHost> </code></pre> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761458#m1761458 TS ts-self@online.de https://bitworks.de 2019-12-11T18:10:33Z 2019-12-11T18:10:33Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hello,</p> <p>unter welchen Usern laufen denn die Webserverzugriffe?<br> Dürfen die alle dort lesen, wohin der Alias zeigt?</p> <p>Glück Auf<br> Tom vom Berg</p> <div class="signature">-- <br> Es gibt nichts Gutes, außer man tut es!<br> Das Leben selbst ist der Sinn. </div> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761460#m1761460 Simone https://www.raetsel-hilfe.de/ 2019-12-11T18:14:44Z 2019-12-11T18:14:44Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hi,</p> <p>ich habe das mit bindfs gelöst</p> <pre><code class="block">adduser web apt-get -y install bindfs mkdir -p /home/web/www chown web:web /home/web/www chmod 755 /home/web/www mcedit /etc/fstab cat /etc/fstab ###### web user ###### bindfs#/var/www /home/web/www fuse force-user=web,force-group=web,create-for-user=www-data,create-for-group=www-data,create-with-perms=0755,chgrp-ignore,chown-ignore,chmod-ignore 0 0 </code></pre> <p><a href="https://fullstackdevelopment.de/linux/286/ultimative-loesung-des-problems-der-nutzerrechte-in-var-www-html/" rel="nofollow noopener noreferrer">https://fullstackdevelopment.de/linux/286/ultimative-loesung-des-problems-der-nutzerrechte-in-var-www-html/</a></p> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761465#m1761465 TS ts-self@online.de https://bitworks.de 2019-12-11T18:45:25Z 2019-12-11T18:46:02Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hello,</p> <p>☆grins☆</p> <p>Welche Überraschung kommt als nächstes? Kommt mir inzwischen so vor, wie ein Wickelpaket oder eine Babuschka ;-P</p> <p>Du hast bestimmt parallel zu dieser Entwicklung auch immer die passenden Test/Debug-Strategien aufgebaut und schrittweise ausprobiert?</p> <p>Liste doch mal die Zwiebelschalen nebst Tests in der Reihenfolge der Abhängigkeiten auf :-)</p> <p>Dann wird vielleicht klar, wo die Transparenz kaputt gegangen ist.</p> <p>Glück Auf<br> Tom vom Berg</p> <div class="signature">-- <br> Es gibt nichts Gutes, außer man tut es!<br> Das Leben selbst ist der Sinn. </div> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761466#m1761466 Simone https://www.raetsel-hilfe.de/ 2019-12-11T19:04:24Z 2019-12-11T19:04:24Z Alias Nginx-Proxy vs. Apache2 Alias <p>hm,</p> <p>Überraschung : der Server läuft auf ein PI ;o)</p> <p>Portiere aber gerade die Sache auf einen Erwachsenen .... und mache die Doku</p> <p>Über ap0 gibt es eine virtuelle Schnittstelle nicht erreichbar für den Rest der Welt..iptables</p> <p>Naja nur wenn man den Wlan Zugang hat darf man auf den Server und arbeiten als max 150 Meter ..</p> <pre><code class="block"># ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp1s0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 68:1d:ef:16:54:a1 brd ff:ff:ff:ff:ff:ff inet 192.168.0.83/24 brd 192.168.0.255 scope global dynamic enp1s0 valid_lft 863975sec preferred_lft 863975sec inet 192.168.0.80/24 brd 192.168.0.255 scope global secondary dynamic enp1s0 valid_lft 863978sec preferred_lft 863978sec inet6 fe80::6a1d:efff:fe16:54a1/64 scope link valid_lft forever preferred_lft forever 3: wlp2s0: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 50:eb:71:7f:94:2d brd ff:ff:ff:ff:ff:ff inet 192.168.0.82/24 brd 192.168.0.255 scope global dynamic wlp2s0 valid_lft 863980sec preferred_lft 863980sec inet6 fe80::52eb:71ff:fe7f:942d/64 scope link valid_lft forever preferred_lft forever 4: ap0: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 50:eb:71:7f:94:2e brd ff:ff:ff:ff:ff:ff inet 192.168.4.1/24 brd 192.168.4.255 scope global ap0 valid_lft forever preferred_lft forever inet6 fe80::52eb:71ff:fe7f:942e/64 scope link valid_lft forever preferred_lft forever </code></pre> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761467#m1761467 Simone https://www.raetsel-hilfe.de/ 2019-12-11T19:12:29Z 2019-12-11T19:12:29Z Alias Nginx-Proxy vs. Apache2 Alias <p>@Rechte</p> <pre><code class="block">sudo chown -R www-data:www-data /var/www/ sudo find /var/www -type d -exec chmod g+s {} + </code></pre> <p>Hm, mir ist nicht so ganz klar ob der Apache-Alias funktioniert oder eben nicht.</p> <p>.htaccess Regeln greifen auch mod_rewrite</p> <p>Muss mir das evtl. noch mal richtig in den Logfiles ansehen</p> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761511#m1761511 TS ts-self@online.de https://bitworks.de 2019-12-12T10:21:47Z 2019-12-12T10:21:47Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hello,</p> <p>wie sieht's aus mit der Installation?</p> <p>Was ich aber nicht verstehe:<br> wozu einen NGINX-Proxy auf demselben Host, wie den Apache-Webserver? Eine Abgrenzung zwischen DMZ und Secure-LAN kann man damit doch nicht wirklich erreichen. Und Performance-Gewinn ist doch auch nicht zu erwarten, oder!?</p> <p>Glück Auf<br> Tom vom Berg</p> <div class="signature">-- <br> Es gibt nichts Gutes, außer man tut es!<br> Das Leben selbst ist der Sinn. </div> https://forum.selfhtml.org/self/2019/dec/11/alias-nginx-proxy-vs-apache2-alias/1761514#m1761514 Simone https://www.raetsel-hilfe.de/ 2019-12-12T10:49:02Z 2019-12-12T10:49:02Z Alias Nginx-Proxy vs. Apache2 Alias <p>Hi,</p> <p>Naja, der Performance-Gewinn sollte mal getestet werden... Ich denke dennoch das es hochperforant sein kann (-wenn richtig eingerichtet-)</p> <p>siehe hierzu: https://docs.plesk.com/de-DE/obsidian/administrator-guide/70837/</p> <p>Ich versuche als Entwicklungsoberfläche das nachzubauen was ich im realen Server-Betrieb wirklich nutze. Und Strato macht das eben so.</p> <p>@Installation</p> <p>Bin jetzt bei:</p> <pre><code class="block">sudo a2enmod remoteip systemctl restart apache2 </code></pre> <p>@Eine Abgrenzung zwischen DMZ und Secure-LAN kann man damit doch nicht wirklich erreichen.</p> <p>Hm,eine komplette Sicherheit gibt es natürlich nicht... "Entwicklungs-Server" ist nur über Wlan erreichbar SSH binde ich an die virtuelle Schnittstelle incl. IP(Bereich).</p> <pre><code class="block"># Port 22 nur vom virtuellen Wlan iptables -A INPUT -i ap0 -p tcp --dport 22 --source 192.168.4.128/25 -j ACCEPT #ausgehende Netzwerk-Traffic wird zugelassen, aber der gesamte TCP/IP-Traffic von außen einfach ignoriert. iptables -A INPUT -i wlp2s0 -p tcp -m multiport --destination-port 21,22,53,443,80,9090 -j DROP iptables -A INPUT -i enp1s0 -p tcp -m multiport --destination-port 21,22,53,443,80,9090 -j DROP #ausgehende Netzwerk-Traffic wird zugelassen, aber der gesamte udp/IP-Traffic von außen einfach ignoriert. iptables -A INPUT -i wlp2s0 -p udp -m multiport --destination-port 53,67,68,137,138,5355 -j DROP iptables -A INPUT -i enp1s0 -p udp -m multiport --destination-port 53,67,68,137,138,5355 -j DROP </code></pre>