-
What is Bitrix Framework?
-
Production Architecture
-
Production Architecture
-
Structure of files
-
Access Rights
-
A Site in Terms of Bitrix Framework
-
-
Processing Techniques
-
Core D7
-
Modules
-
Name Spaces
-
Core Parameter Setup
-
Exceptions
-
Events
-
Code Writing Rules
-
Applications and Context
-
Errors
-
ORM
-
API
-
Highloadblock
-
-
Design Integration
-
Using Access Rights
-
Site Design Template
-
Using message files for localization
-
Editable areas
-
Navigation tools
-
Advertisement
-
Managing Template Service Data
-
Editing Service Areas
-
Managing Page Encoding
-
Managing Document Header
-
Managing Metadata Values
-
CSS management
-
-
Setup of External Appearance of Additional Elements of the Site Design
-
-
Information Blocks
-
Working with Infoblocks Using Standard Means
-
Infoblocks 2.0
-
Action Plan in Case of Problems
-
Sorting
-
Work with Infoblocks through API
-
Examples
-
-
Components
-
Simple and composite components
-
Location of a Component in the System and Its Connection
-
Component Structure
-
Composite Component Structure
-
Component Description
-
Component Parameters
-
Component Templates
-
Support of Component Classes
-
result_modifier.php
-
component_epilog.php
-
Operation of a Composite Component in a SEF Mode
-
Frequent Errors
-
Component Caching
-
Working with Components
-
Template Customization
-
Component Customization
-
Creating Components
-
Additional Methods
-
Redefinition of Incoming Variables
-
User-Defined Templating Engines
-
Operation of a Composite Component in SEF Mode
-
Ways of Data Transmission among Components
-
A Simple Example of a Component Creation
-
Component Creation Example
-
TinyMCE Visual Editor Integration Component
-
Caching in own components
-
-
CUSTOM Parameter Type
-
More examples
-
Errors When Working with Components
-
-
-
Modules
-
Programming in Bitrix Framework
-
Golden Rules
-
The file init.php
-
UTF-8 or a National Encoding?
-
Working with Databases
-
Setup of SEF for URLs
-
Language Files
-
JS Library
-
Interface of the Control Panel Toolbar as Seen by a Developer
-
Some Theory
-
Performance
-
Security
-
Examples, tricks, and advice
-
Custom Fields
-
Gadgets
-
Project Testing
-
Project Quality Control
-
Debugging Web Applications
-
-
Push and Pull module
-
Version Control System
-
-
Multiple Sites
-
Introduction
-
Use of Multiple Site Version
-
How many sites can I create?
-
Language versions (mirrors)
-
Sharing visitors between sites
-
Configuring the multisite system
-
Working with the Data in a Multiple Site Configuration
-
Frequent Questions Arising When Working with a Multiple Site Configuration
-
-
Business Processes for Developer
-
Template of a Business Process
-
Business Process
-
Activities
-
Executing a business process activity using API
-
Arbitrary PHP Code in a Business Process
-
-
Additional Information and Examples
Examples of Apache Server Settings
Lesson 224 out of 253
Apache web server is normally set up by the host’s technical support service. Examples of Apache server’s settings provided below are intended for reference and understanding the setup mechanism.
Multiple Site in One Domain
The configuration file httpd.conf of the Apache web server must contain an entry similar to the following:
<VirtualHost *:80>
ServerAdmin admin@site1.com
DocumentRoot "/home/www/allsites/"
ServerName www.site1.com
ErrorLog logs/allsite.log
CustomLog logs/allsite.log common
</VirtualHost>
Please note that the DocumentRoot parameter has the value /home/www/allsites/
and directly indicates the catalog where the product is installed. The DocumentRoot parameter will have the same value for both websites.
The line <VirtualHost *:80> indicates that the web server will respond to any domain name at any IP address. I.e. if the DNS server is set up properly, the web server will respond to either name – www.site1.com or www.site2.com.
Multiple Site in Different Domains
The configuration file httpd.conf of the Apache web server must contain two entries. Each one of these entries must describe its "virtual server" (in Apache terms):
<VirtualHost *:80>
ServerAdmin admin@site1.com
DocumentRoot "/home/www/site1/"
ServerName site1.com
ServerAlias *.site1.com
ErrorLog logs/site1.log
CustomLog logs/site1.log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@site2.com
DocumentRoot "/home/www/site2/"
ServerName site2.com
ServerAlias *.site2.com
ErrorLog logs/site2.log
CustomLog logs/site2.log common
</VirtualHost>
Please note that the DocumentRoot parameter for each website indicates a different catalog on the disk where the relevant website must be located.
The lines <VirtualHost *:80> indicate that the web server will respond at any IP address, but the variable ServerAlias indicates that each website will respond only to a specific domain name.
I.e. the domain name www.site1.com will be processed by one web server Apache which works with the catalog /home/www/site1/
and www.site2.com by another web server that works with the catalog /home/www/site2/
.
Also a configuration option is available for different IP addresses. A sample Apache configuration for two different IP addresses is provided below:
<VirtualHost 192.168.0.1:80>
ServerAdmin admin@site1.com
DocumentRoot "/home/www/site1/"
ServerName site1.com
ErrorLog logs/site1.log
CustomLog logs/site1.log common
Options +FollowSymLinks
</VirtualHost>
<VirtualHost 192.168.0.2:80>
ServerAdmin admin@site2.com
DocumentRoot "/home/www/site2/"
ServerName site2.com
ErrorLog logs/site2.log
CustomLog logs/site2.log common
Options +FollowSymLinks
</VirtualHost>
In this case, if DNS is set up properly for different domain names each "virtual server" (in Apache terms) will work at a separate IP address and respond only to a specific domain name.
Sometimes website administrators have no access to the file httpd.conf due to certain reasons, for example hosting limitations. In this case, website information can be separated as follows:
- Create the folder
/bitrix_personal
in the root of the second website - In this folder create two symbolic links to
/bitrix/php_interface/
and/bitrix/templates/
of the first website. - Type the following in the very beginning of the file .htaccess located in the root of each website:
SetEnv "/bitrix/bitrix_personal"