Jump to content
  • 0

VirtualHost


Zzz_
 Share

Question

Пытаюсь организовать поддомены,

Через VirtualHost,

Создаю много хостов:

<VirtualHost *:80>
DocumentRoot "C:/xx/yy"
ServerName one.ru
ServerAlias www.one.ru
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xx/yy/zz"
ServerName three.one.ru
ServerAlias www.three.one.ru
</VirtualHost>

Ну В общем так 5штук

Потом прочитал про VirtualDocumentRoot


<VirtualHost *:80>
ServerName one.ru
ServerAlias one.ru *.one.ru
VirtualDocumentRoot "C:/xx/yy/zz/%1"
</VirtualHost>

Проблема заключается в том что когда я захожу на сайт:

three.one.ru он может грузиться за милисекунду, а может за минуту, может нужно как то настроить или есть другой способ создания поддоменов?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Добавьте в VirtualHost строки


ErrorLog "/КАКАЯ-НИБУДЬ_ДИРЕКТОРИЯ/error.log"
CustomLog "/КАКАЯ-НИБУДЬ_ДИРЕКТОРИЯ/access.log" common

будут создаваться логи, их можно будет проанализировать после очередного торможения

Link to comment
Share on other sites

  • 0

Error log, но не от виртуалхоста, это из httpd, в виртуалхосте не пишется!

[Sun Aug 12 14:58:04.438687 2012] [mpm_winnt:notice] [pid 1624:tid 392] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Aug 12 14:58:06.442593 2012] [mpm_winnt:notice] [pid 340:tid 292] AH00364: Child: All worker threads have exited.
[Sun Aug 12 14:58:06.479703 2012] [mpm_winnt:notice] [pid 1624:tid 392] AH00430: Parent: Child process exited successfully.
[Sun Aug 12 14:58:24.692593 2012] [mpm_winnt:notice] [pid 5752:tid 400] AH00455: Apache/2.4.2 (Win32) PHP/5.4.5 configured -- resuming normal operations
[Sun Aug 12 14:58:24.694546 2012] [mpm_winnt:notice] [pid 5752:tid 400] AH00456: Server built: May 13 2012 14:10:15
[Sun Aug 12 14:58:24.694546 2012] [core:notice] [pid 5752:tid 400] AH00094: Command line: 'C:\\MyServer\\apache\\bin\\httpd.exe -d C:/MyServer/apache'
[Sun Aug 12 14:58:24.694546 2012] [mpm_winnt:notice] [pid 5752:tid 400] AH00418: Parent: Created child process 5780
[Sun Aug 12 14:58:25.553921 2012] [mpm_winnt:notice] [pid 5780:tid 300] AH00354: Child: Starting 150 worker threads.

А в CustomLog, записаны все загруженые изображения и страницы:

кусочек кода:


127.0.0.1 - - [12/Aug/2012:14:58:30 +0400] "GET / HTTP/1.1" 200 9612
127.0.0.1 - - [12/Aug/2012:14:58:30 +0400] "GET /css.php?udal&index&blog HTTP/1.1" 200 21201
127.0.0.1 - - [12/Aug/2012:14:58:30 +0400] "GET /img/background.jpg HTTP/1.1" 304 -
127.0.0.1 - - [12/Aug/2012:14:58:30 +0400] "GET /img/header.jpg HTTP/1.1" 304 -
127.0.0.1 - - [12/Aug/2012:14:58:30 +0400] "GET /img/logo.png HTTP/1.1" 304 -
127.0.0.1 - - [12/Aug/2012:14:58:30 +0400] "GET /img/ti.ico HTTP/1.1" 404 217

Да и еще когда не было поддоменов страницы грузились за милисекунды.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy