Suse Apache: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 1: Zeile 1:
 
=Installation=
 
=Installation=
 
*zypper install -y apache2
 
*zypper install -y apache2
−
=Verzeichnis erstellen=
+
=Konfigutration=
−
*mkdir -m 777 /mnt/share
+
*vi /etc/apache2/vhosts.d/vhost.conf  
−
 
 
−
=Konfiguration=
 
−
*cat /etc/smb.conf
 
 
<pre>
 
<pre>
−
[global]
+
<VirtualHost 172.28.6.100>
−
  workgroup = WORKGROUP
+
    ServerAdmin technik@xinux.de
−
  server string = %h server (Samba, Ubuntu)
+
    DocumentRoot /srv/www/htdocs
−
  dns proxy = no
+
    ErrorLog /var/log/apache2/vhost-error_log
−
  log file = /var/log/samba/log.%m
+
    CustomLog /var/log/apache2/vhost-access_log combined
−
  max log size = 1000
+
    <Directory "/srv/www/htdocs">
−
  panic action = /usr/share/samba/panic-action %d
+
    Options +Indexes
−
  server role = standalone server
+
    AllowOverride all
−
  passdb backend = tdbsam
+
    </Directory>
−
  unix password sync = yes
+
</VirtualHost>
−
  pam password change = yes
 
−
  passwd program = /usr/bin/passwd %u
 
−
  passwd chat = *new*password* %n\n *new*password* %n\n *updated*
 
−
  passwd chat debug = yes
 
−
  map to guest = bad user
 
−
  usershare allow guests = yes
 
−
  acl allow execute always = yes
 
−
 
 
−
[share]
 
−
  comment = public anonymous access
 
−
  path = /mnt/share
 
−
  browsable =yes
 
−
  create mask = 0660
 
−
  directory mask = 0771
 
−
  writable = yes
 
−
  guest ok = yes
 
−
</pre>=Installation=
 
−
*zypper -y install samba
 
−
=Verzeichnis erstellen=
 
−
*mkdir -m 777 /mnt/share
 
−
 
 
−
=Konfiguration=
 
−
*cat /etc/smb.conf
 
−
<pre>
 
−
[global]
 
−
  workgroup = WORKGROUP
 
−
  server string = %h server (Samba, Ubuntu)
 
−
  dns proxy = no
 
−
  log file = /var/log/samba/log.%m
 
−
  max log size = 1000
 
−
  panic action = /usr/share/samba/panic-action %d
 
−
  server role = standalone server
 
−
  passdb backend = tdbsam
 
−
  unix password sync = yes
 
−
  pam password change = yes
 
−
  passwd program = /usr/bin/passwd %u
 
−
  passwd chat = *new*password* %n\n *new*password* %n\n *updated*
 
−
  passwd chat debug = yes
 
−
  map to guest = bad user
 
−
  usershare allow guests = yes
 
−
  acl allow execute always = yes
 
−
 
 
−
[share]
 
−
  comment = public anonymous access
 
−
  path = /mnt/share
 
−
  browsable =yes
 
−
  create mask = 0660
 
−
  directory mask = 0771
 
−
  writable = yes
 
−
  guest ok = yes
 
 
</pre>
 
</pre>
−
 
 
=Dienst Aktivieren=
 
=Dienst Aktivieren=
 
*systemctl enable apache2 --now
 
*systemctl enable apache2 --now
−
 
−
=Checken ob die Dienste laufen=
 
−
*ss -lnutp | grep mbd
 
−
<pre>
 
−
udp  UNCONN 0      0      172.28.6.255:137      0.0.0.0:*    users:(("nmbd",pid=3396,fd=17)) 
 
−
udp  UNCONN 0      0      172.28.6.100:137      0.0.0.0:*    users:(("nmbd",pid=3396,fd=16)) 
 
−
udp  UNCONN 0      0            0.0.0.0:137      0.0.0.0:*    users:(("nmbd",pid=3396,fd=14)) 
 
−
udp  UNCONN 0      0      172.28.6.255:138      0.0.0.0:*    users:(("nmbd",pid=3396,fd=19)) 
 
−
udp  UNCONN 0      0      172.28.6.100:138      0.0.0.0:*    users:(("nmbd",pid=3396,fd=18)) 
 
−
udp  UNCONN 0      0            0.0.0.0:138      0.0.0.0:*    users:(("nmbd",pid=3396,fd=15)) 
 
−
tcp  LISTEN 0      50          0.0.0.0:139      0.0.0.0:*    users:(("smbd",pid=3375,fd=32)) 
 
−
tcp  LISTEN 0      50          0.0.0.0:445      0.0.0.0:*    users:(("smbd",pid=3375,fd=31)) 
 
−
tcp  LISTEN 0      50              [::]:139          [::]:*    users:(("smbd",pid=3375,fd=30)) 
 
−
tcp  LISTEN 0      50              [::]:445          [::]:*    users:(("smbd",pid=3375,fd=29))
 
−
</pre>
 
−
=Firewall neuladen=
 
−
*firewall-cmd --zone=public --add-service=samba --permanent
 
−
*firewall-cmd --reload
 
−
 
−
 
−
=Dienste Aktivieren=
 
−
*systemctl enable smb --now
 
−
*systemctl enable nmb --now
 
 
=Checken ob die Dienste laufen=
 
=Checken ob die Dienste laufen=
−
*ss -lnutp | grep mbd
+
*ss -lnutp | grep 80
−
<pre>
+
  LISTEN 0      4096 *:80 *:*  users:(("httpd-prefork",pid=2443,fd=4) ...
−
udp  UNCONN 0      0      172.28.6.255:137      0.0.0.0:*    users:(("nmbd",pid=3396,fd=17))  
 
−
udp  UNCONN 0      0      172.28.6.100:137      0.0.0.0:*    users:(("nmbd",pid=3396,fd=16)) 
 
−
udp  UNCONN 0      0            0.0.0.0:137      0.0.0.0:*    users:(("nmbd",pid=3396,fd=14))  
 
−
udp  UNCONN 0      0      172.28.6.255:138      0.0.0.0:*   users:(("nmbd",pid=3396,fd=19))  
 
−
udp  UNCONN 0      0      172.28.6.100:138      0.0.0.0:*   users:(("nmbd",pid=3396,fd=18)) 
 
−
udp  UNCONN 0      0            0.0.0.0:138      0.0.0.0:*   users:(("nmbd",pid=3396,fd=15)) 
 
−
tcp   LISTEN 0      50          0.0.0.0:139      0.0.0.0:*    users:(("smbd",pid=3375,fd=32)) 
 
−
tcp  LISTEN 0      50          0.0.0.0:445      0.0.0.0:*    users:(("smbd",pid=3375,fd=31)) 
 
−
tcp  LISTEN 0      50              [::]:139          [::]:*    users:(("smbd",pid=3375,fd=30)) 
 
−
tcp  LISTEN 0      50              [::]:445          [::]:*    users:(("smbd",pid=3375,fd=29))
 
−
</pre>
 
 
=Firewall neuladen=
 
=Firewall neuladen=
 
*firewall-cmd --zone=public --add-service=samba --permanent
 
*firewall-cmd --zone=public --add-service=samba --permanent
 
*firewall-cmd --reload
 
*firewall-cmd --reload

Aktuelle Version vom 16. November 2022, 17:22 Uhr

Installation

  • zypper install -y apache2

Konfigutration

  • vi /etc/apache2/vhosts.d/vhost.conf
<VirtualHost 172.28.6.100>
    ServerAdmin technik@xinux.de
    DocumentRoot /srv/www/htdocs
    ErrorLog /var/log/apache2/vhost-error_log
    CustomLog /var/log/apache2/vhost-access_log combined
    <Directory "/srv/www/htdocs">
    Options +Indexes
    AllowOverride all
    </Directory>
</VirtualHost>

Dienst Aktivieren

  • systemctl enable apache2 --now

Checken ob die Dienste laufen

  • ss -lnutp | grep 80
LISTEN 0      4096  *:80  *:*   users:(("httpd-prefork",pid=2443,fd=4) ...

Firewall neuladen

  • firewall-cmd --zone=public --add-service=samba --permanent
  • firewall-cmd --reload