User Tools

Site Tools


vhost

root@rolapps:/etc/apache2/sites-available# vi photorol.conf <VirtualHost *:80>

      ServerName rol.xxxx.com.bd
      ServerAlias www.rol.xxxx.com.bd
      ServerAdmin webmaster@localhost
      DirectoryIndex index.html index.php
      DocumentRoot /var/www/roldocs
      <Directory "/var/www/roldocs/">
             Options FollowSymLinks
             Options -Indexes
              AllowOverride All
              Require all granted
      </Directory>

<VirtualHost *:80>

      ServerName rol.xxxx.com.bd
      ServerAlias www.rol.xxxx.com.bd
      ServerAdmin webmaster@localhost
      DirectoryIndex index.html index.php
      DocumentRoot /var/www/roldocs
      <Directory "/var/www/roldocs/">
             Options FollowSymLinks
             Options -Indexes
              AllowOverride All
              Require all granted
      </Directory>

<Directory “/var/www/roldocs/contents/(.*)”>

             Options FollowSymLinks
             Options -Indexes
              AllowOverride All
              php_flag engine off
              Require all granted
      </Directory>
      <Files ^(*.php|*.jpeg|*.jpg|*.png|*.gif|*.pdf|*.txt|*.swf|*.flv|*.css|*.js|*.mp3|*.mp4|*.fla|*.docx|*.doc)>
      Require all denied
      </Files>
      ErrorLog ${APACHE_LOG_DIR}/rol_error.log
      LogLevel warn
      CustomLog ${APACHE_LOG_DIR}/rol_access.log combined

</VirtualHost>

root@apps:/etc/apache2/sites-available# vi xxxx.com.conf <VirtualHost *:80>

      ServerName xxxx.com
      ServerAlias www.xxxx.com
      ServerAlias xxxx.com.bd
      ServerAlias www.xxxx.com.bd
      ServerAlias m.xxxx.com
      ServerAlias cdn.xxxx.com
      ServerAlias cdnpush.xxxx.com
      ServerAdmin webmaster@localhost
      DirectoryIndex index.html index.php
      DocumentRoot /var/www/btdocs/content
      <Directory "/var/www/btdocs/content/">
              Options FollowSymLinks MultiViews
              Options -Indexes
              AllowOverride All
              Require all denied
      </Directory>
       <Directory "/var/www/btdocs/content/contents/(.*)">

<VirtualHost *:80>

      ServerName xxxx.com
      ServerAlias www.xxxx.com
      ServerAlias xxxx.com.bd
      ServerAlias www.xxxx.com.bd
      ServerAlias m.xxxx.com
      ServerAlias cdn.xxxx.com
      ServerAlias cdnpush.xxxx.com
      ServerAdmin webmaster@localhost
      DirectoryIndex index.html index.php
      DocumentRoot /var/www/btdocs/content
      <Directory "/var/www/btdocs/content/">
              Options FollowSymLinks MultiViews
              Options -Indexes
              AllowOverride All
              Require all denied
      </Directory>
       <Directory "/var/www/btdocs/content/contents/(.*)">
             Options FollowSymLinks
              Options -Indexes
              AllowOverride All
              php_flag engine off
              Require all granted
      </Directory>
      #now deny all files from accessing
       <Files ~ "\.(.*)$">
              Require all denied
       </Files>
       <Files ~ "index\.php$">
              Require all granted
       </Files>
      <Files ~ "\.(jpeg|jpg|png|gif|pdf|txt|swf|flv|css|js|mp3|mp4|docx|doc|ttf|xml|html|htm|ico)$">
      AllowOverride All
      Require all granted
      </Files>

# <Files ^(*.php|*.jpeg|*.jpg|*.png|*.gif|*.pdf|*.txt|*.swf|*.flv|*.css|*.js|*.mp3|*.mp4|*.fla|*.docx|*.doc)> # #order deny,allow # Require all denied # </Files>

      ErrorLog ${APACHE_LOG_DIR}/xxxx_error.log
      LogLevel warn
      CustomLog ${APACHE_LOG_DIR}/xxxx_access.log combined

</VirtualHost>

                                                                          52,1          Bot
              Require all denied
      </Directory>
       <Directory "/var/www/btdocs/content/contents/(.*)">
             Options FollowSymLinks
              Options -Indexes

—-

vhost.txt · Last modified: 2023/03/06 11:31 by 127.0.0.1