50 likes | 185 Views
/etc/apache2/apache2.conf # Porneste gazduirea virtuala pe http NameVirtualHost 1.2.3.4:80 # Porneste gazduirea virtuala pe https NameVirtualHost 1.2.3.4:443. /etc/apache2/ports.conf. Listen 80 <IfModule mod_ssl.c> Listen 443 </IfModule>. /etc/apache2/sites-available/banca6.ro.
E N D
/etc/apache2/apache2.conf # Porneste gazduirea virtuala pe http NameVirtualHost 1.2.3.4:80 # Porneste gazduirea virtuala pe https NameVirtualHost 1.2.3.4:443 /etc/apache2/ports.conf Listen 80 <IfModule mod_ssl.c> Listen 443 </IfModule>
/etc/apache2/sites-available/banca6.ro <VirtualHost 192.168.1.254:80>ServerName domeniu.roServerAlias www.domeniu.roServerAdmin admin@domeniu.roDocumentRoot /var/gazduire/domeniu.ro <Directory /var/gazduire/domeniu.ro> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> Alias /soft/ "/soft/“ <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 192.168.1.3 </Directory> </VirtualHost> a2ensite domeniu.ro
/etc/apache/sites-available/mail.domeniu.ro <IfModule mod_ssl.c> <VirtualHost 1.2.3.4:443>ServerName mail.domeniu.roServerAlias webmail.domeniu.roServerAdmin admin@domeniu.roDocumentRoot /var/gazduire/mail.domeniu.ro <Directory /var/gazduire/mail.domeniu.ro> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> SSLEngine OnSSLCertificateFile /etc/apache2/ssl/mail.domeniu.crtSSLCertificateKeyFile /etc/apache2/ssl/mail.domeniu.key </VirtualHost> </IfModule> a2ensite mail.domeniu.ro
Create a file /var/gazduire/domeniu.ro/.htaccess AuthName "Add your login message here.“ AuthType Basic AuthUserFile /var/gazduire/domeniu.ro/.htpasswd require valid-user • htpasswd -c .htpasswd name-of-user
How To Create Self Signed Certificate openssl genrsa -des3 -out mail.domeniu.ro.key 4096 Remove the passphrase from the key file. mv mail.domeniu.ro.key mail.domeniu.ro.key.secureopenssl rsa -in server.key.secure -out server.key Generate the CA file. openssl req -new -x509 -days 365 -key mail.domeniu.ro.key -out mail.domeniu.ro.ca Generate the CSR file openssl req -new -key mail.domeniu.ro.key -out mail.domeniu.ro.csr Generate the CRT file. openssl x509 -req -days 365 -in mail.domeniu.ro.csr -signkey mail.domeniu.ro.key -out mail.domeniu.crt