Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet452/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   448   449   450   451   452   453   454   455   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 351 
]
Of course, there's more to Apache than simply installing it and having it present a 
sample web page. While you could certainly replace the content in the sample web 
page with your own and be all set when it comes to hosting content to your users, 
there's much more to understand. For instance, there are several configuration files 
in the 
/etc/apache2
 directory that govern how sites are hosted, as well as which 
directories Apache will look in to find web pages to host. Apache also features 
plugins, which we will go over as well.
The directory that Apache serves web pages from is known as the 
document root

with 
/var/www/html
 being the default. Inside that directory, you'll see an 
index.html
 
file, which is actually the default page you see when you visit an unmodified Apache 
server. Essentially, this is a test page that is designed to show you that the server is 
working, as well as some tidbits of information regarding the default configuration.
You're not limited to hosting just one website on a server, though. Apache supports 
the concept of a 
virtual host
, which allows you to serve multiple websites from a 
single
 server. Each virtual host consists of an individual configuration file, which 
differentiates itself based on either name or IP address. For example, you could 
have an Apache server with a single IP address that hosts two different websites, 
such as 
acmeconsulting.com
 and 
acmesales.com
. These are hypothetical websites, 
but you get the idea. To set this up, you would create separate configuration 
files for 
acmeconsulting.com
 and 
acmesales.com
 and store them in your Apache 
configuration directory. Each configuration file would include a 

 
stanza, where you would place an identifier such as a name or IP address that 
differentiates one from the other. When a request comes in, Apache will serve either 
acmeconsulting.com
 or 
acmesales.com
 to the user's browser, depending on which 
criteria matched when the request came in. The configuration files for each site 
typically end with the 
.conf
 filename extension, and are stored in the 
/etc/apache2/
sites-available
 directory. We'll go over all of this in more detail shortly.
The basic workflow for setting up a new site (virtual host) will typically be similar to 
the following:
• 
The web developer creates the website and related files
• 
These files are uploaded to Ubuntu Server, typically in a sub-directory of 
 
/var/www
 or another directory the administrator has chosen
• 
The server administrator creates a configuration file for the site, and copies it 
into the 
/etc/apache2/sites-available
 directory
•  The administrator enables the site and reloads Apache


Serving Web Content

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   448   449   450   451   452   453   454   455   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish