Navegando neste Tópico:   1 usuários anônimos





Hosts virtuais no apache
Not too shy to talk
Cadastrado em:
24/8/2007 10:53
Grupo:
Registered Users
Mensagens: 29
Offline
Olá!
Estou instalando gforge (www.gforge.org) e o mesmo exige um host virtual, a pŕopria instalaçao ja cria o conf para o host
que ele necessita e que reproduzo aqui, o apache esta rodando sem problemas ou sem mensagem de erros, o problema é que quando
chamo qualquer host só vem o principal, reproduzo aqui o httpd.conf (já com as alterações do gforge. - o host criado -) e também
o meu /etc/hosts, antes descrevo o cenário:

Tenho 2 redirecionamentos para o meu ip dinamico, um no dyndns e outro no no-ip, para que eu possa usar alguns serviços que
ja temos instalados no no-ip e gforge (com um uso mais restrito) Já consultei a documentação no site do apache e estou fazendo
exatamente igual recomendam e tambem a documentacao em dyndns mas não adianta sempre vem o servidor principal:

**** httpd.conf

ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>


<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

Listen 80

# Carga dos módulos
include /etc/httpd/conf/httpd.local.conf

Include conf.d/*.conf

User apache
Group apache

### Section 2: 'Main' server configuration

ServerAdmin [email protected]
ServerName rause.no-ip.org:80
UseCanonicalName Off
DocumentRoot "/var/www/html"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


<Directory "/var/www/html">

Options Indexes FollowSymLinks
Order allow,deny
Allow from all

</Directory>

<IfModule mod_userdir.c>
UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html

</IfModule>


DirectoryIndex index.html index.html.var

AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>


TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access_log combined
ServerSignature On
Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

#
# WebDAV module configuration section.
#
<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>

# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>
</IfModule>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully


### Section 3: Virtual Hosts


//A chamada do gforge que comentei e inclui diretamente neste aquivo p/ postar aqui
#Include /etc/gforge/httpd.conf

<VirtualHost _default_:80 >
ServerName meusite.homeip.net
DocumentRoot /opt/gforge5/www
ErrorDocument 404 /404.php

<Directory "/opt/gforge5/www">
Options Indexes FollowSymLinks Multiviews
Order allow,deny
allow from all
</Directory>

<Location "/gf">
ForceType application/x-httpd-php
</Location>

#
# mailman settings - may have to adjust
#
ScriptAlias /mailman /usr/lib/mailman/cgi-bin
RewriteEngine on
RewriteRule ^/pipermail / [R=permanent]
# Alias /pipermail /var/lib/mailman/archives/public

<Directory "/usr/lib/mailman/cgi-bin">
Options Indexes FollowSymLinks Multiviews
Order allow,deny
allow from all
</Directory>

<Directory "/var/lib/mailman/archives/public">
Options Indexes FollowSymLinks Multiviews
Order allow,deny
allow from all
</Directory>

#
# SVN Repository
#
<Location /svn>
ErrorDocument 404 default
DAV svn
SVNParentPath /var/lib/gforge/svnroot

# how to authenticate a user
AuthzSVNAccessFile /var/lib/gforge/svnroot-access
AuthType Basic
AuthName "Document repository"
AuthUserFile /var/lib/gforge/svnroot-authfile
SVNIndexXSLT "/svnindex.xsl"

# only authenticated users may access the repository
Require valid-user
</Location>

# php_value include_path ".:/opt/gforge5:/opt/gforge5/lib:/opt/gforge5/lib/external"


</VirtualHost>


******************************************
** O /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 server0.muesite.local server0 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

127.0.0.1 http://meusite.homeip.net meusite.homeip.net

Enviado em: 26/8/2007 19:29

Editado por gustavoh em 27-08-2007 12:04:17
Transferir mensagem para outros aplicativos Transferir


Re: Hosts virtuais no apache
Home away from home
Cadastrado em:
19/4 3:00
De Tbilisi
Grupo:
Registered Users
Mensagens: 3289
Offline

Enviado em: 27/4 1:22
Transferir mensagem para outros aplicativos Transferir






Você pode exibir os tópicos.
Você não pode iniciar um novo tópico.
Você não pode responder.
Você não pode editar.
Você não pode excluir mensagens.
Você não pode incluir votações.
Você não pode votar.
Você não pode anexar arquivos.
Você não pode enviar mensagens sem aprovação.

[Pesquisa Avançada]