קוד: |
<VirtualHost *:80>
ServerName xyz.co.il DocumentRoot /var/www/xyz/public_html AddDefaultCharset UTF-8 <Location /> Allow from all </Location> <Directory /var/www/xyz/public_html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny deny from 31.155.168.78 deny from 51.15.58.234 allow from all </Directory> </VirtualHost> |
קוד: |
RewriteEngine On
RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] # AddHandler php-stable .php RewriteCond %{HTTPS} !=on [NC] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} |
קוד: |
~# a2enmod
Your choices are: access_compat actions alias allowmethods asis auth_basic auth_digest auth_form authn_anon authn_core authn_dbd authn_dbm authn_file authn_socache authnz_fcgi authnz_ldap authz_core authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex buffer cache cache_disk cache_socache cern_meta cgi cgid charset_lite data dav dav_fs dav_lock dbd deflate dialup dir dump_io echo env expires ext_filter file_cache filter geoip headers heartbeat heartmonitor http2 ident imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat ldap log_debug log_forensic lua macro mime mime_magic mpm_event mpm_prefork mpm_worker negotiation php7.0 proxy proxy_ajp proxy_balancer proxy_connect proxy_express proxy_fcgi proxy_fdpass proxy_ftp proxy_hcheck proxy_html proxy_http proxy_http2 proxy_scgi proxy_wstunnel ratelimit reflector remoteip reqtimeout request rewrite sed session session_cookie session_crypto session_dbd setenvif slotmem_plain slotmem_shm socache_dbm socache_memcache socache_shmcb speling ssl status substitute suexec unique_id userdir usertrack vhost_alias xml2enc Which module(s) do you want to enable (wildcards ok)? |
קוד: |
:/etc/apache2/mods-enabled# ls -la ../mods-available/rewrite.load
-rw-r--r-- 1 root root 66 Nov 3 13:34 ../mods-available/rewrite.load |
קוד: |
# grep htac /etc/apache2/apache2.conf
AccessFileName .htaccess |
COM64 : | ||||
נראה שהמודול מופעל:
והלינק אליו:
ועדיין לא פועל |
קוד: |
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin admin@efly.co.il # DocumentRoot /var/www/html DocumentRoot /var/www/eflyco/public_html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet <VirtualHost *:80> ServerName www.efly.co.il # ServerAlias *.efly.co.il DocumentRoot /var/www/eflyco/public_html AddDefaultCharset latin1 <Location /> Allow from all </Location> <Directory /var/www/eflyco/public_html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny deny from 31.155.168.78 deny from 51.15.58.234 allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName efly.co.il DocumentRoot /var/www/eflyco/public_html AddDefaultCharset UTF-8 <Location /> Allow from all </Location> <Directory /var/www/eflyco/public_html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny deny from 31.155.168.78 deny from 51.15.58.234 allow from all </Directory> </VirtualHost> |
קוד: |
ls -l /etc/apache2/sites-enabled/ |
קוד: |
root@efly:~# ls -la /etc/apache2/sites-enabled/
total 8 drwxr-xr-x 2 root root 4096 May 1 06:56 . drwxr-xr-x 8 root root 4096 May 9 07:51 .. lrwxrwxrwx 1 root root 35 Mar 22 09:09 000-default.conf -> ../sites-available/000-default.conf root@efly:~# |