Erro ao exibir páginas HTML [RESOLVIDO]

13. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 25/07/2015 - 19:11h

Segue a saída.. efetuei vários testes..


1 <VirtualHost *:80>
2 # The ServerName directive sets the request scheme, hostname and port that
3 # the server uses to identify itself. This is used when creating
4 # redirection URLs. In the context of virtual hosts, the ServerName
5 # specifies what hostname must appear in the request's Host: header to
6 # match this virtual host. For the default virtual host (this file) this
7 # value is not decisive as it is used as a last resort host regardless.
8 # However, you must set it for any further virtual host explicitly.
9 #ServerName www.example.com
10
11 ServerAdmin webmaster@localhost
12 DocumentRoot /var/www/html
13
14 # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
15 # error, crit, alert, emerg.
16 # It is also possible to configure the loglevel for particular
17 # modules, e.g.
18 #LogLevel info ssl:warn
19
20 ErrorLog ${APACHE_LOG_DIR}/error.log
21 CustomLog ${APACHE_LOG_DIR}/access.log combined
22
23 # For most configuration files from conf-available/, which are
24 # enabled or disabled at a global level, it is possible to
25 # include a line for only one particular virtual host. For example the
26 # following line enables the CGI configuration for this host only
27 # after it has been globally disabled with "a2disconf".
28 #Include conf-available/serve-cgi-bin.conf
29 </VirtualHost>
30
31 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
32 <VirtualHost *:80>
33 ServerAdmin admin@example.com
34 ServerName mississsippi.com
35 ServerAlias www.mississippi.com
36 DocumentRoot /var/www/mississippi.com/public_html
37 ErrorLog ${APACHE_LOG_DIR}/error.log
38 CustomLog ${APACHE_LOG_DIR}/access.log combined
39 </VirtualHost>
40 <VirtualHost *:80>
41 ServerAdmin admin@example.com
42 ServerName teste22.com
43 ServerAlias www.teste22.com
44 DocumentRoot /var/www/teste22.com/public_html
45 ErrorLog ${APACHE_LOG_DIR}/error.log
46 CustomLog ${APACHE_LOG_DIR}/access.log combined
47 </VirtualHost>


  


14. Re: Erro ao exibir páginas HTML

Wellingthon Dias Queiroz - @tonyhts
tonyhts

(usa Arch Linux)

Enviado em 25/07/2015 - 19:25h

Como desconfiava, não é o /var/www. Lá só esta o document root.

Da uma olhada no /usr/local/apache2. Acho que a pasta é /usr/local/apache2/htdocs

Ou posta a saida de
sudo find /usr/local/apache2/ -iname "*" -exec cat -n {} \; 


abs

---
Eu Acredito, que ás vezes são as pessoas que ninguém espera nada que fazem as coisas que ninguém consegue imaginar.

--- Mestre dos Mestres - Alan Turing ---


15. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 25/07/2015 - 19:33h


Amigo não tem o apache2 dentro da pasta local.


16. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Wellingthon Dias Queiroz - @tonyhts
tonyhts

(usa Arch Linux)

Enviado em 25/07/2015 - 19:45h

Entao faz assim:

sudo mv /etc/apache2/sites-enabled/000-default.conf /tmp/
sudo nano /etc/apache2/sites-enabled/000-default.conf

Cole isso:

VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

Salve e saia: CTRL+O depois ENTER, depois CTRL +X
feito isso, reinicie o apache:
sudo service apache2 restart 




abs

---
Eu Acredito, que ás vezes são as pessoas que ninguém espera nada que fazem as coisas que ninguém consegue imaginar.

--- Mestre dos Mestres - Alan Turing ---


17. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Andre Ribeiro da Costa
andr3ribeiro

(usa Arch Linux)

Enviado em 25/07/2015 - 21:38h


seus arquivos precisam estar no diretorio:
/var/www/html
e não em:
/var/www


18. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Diego da Silva
linux-4ever

(usa CentOS)

Enviado em 26/07/2015 - 01:27h

tonyhts escreveu:

Entao faz assim:

sudo mv /etc/apache2/sites-enabled/000-default.conf /tmp/
sudo nano /etc/apache2/sites-enabled/000-default.conf

Cole isso:

VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

Salve e saia: CTRL+O depois ENTER, depois CTRL +X
feito isso, reinicie o apache:
sudo service apache2 restart 




abs

---
Eu Acredito, que ás vezes são as pessoas que ninguém espera nada que fazem as coisas que ninguém consegue imaginar.

--- Mestre dos Mestres - Alan Turing ---



Valeu meu brother... Era isso mesmo, agora funcionou..
Obrigado pela força



19. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Wellingthon Dias Queiroz - @tonyhts
tonyhts

(usa Arch Linux)

Enviado em 26/07/2015 - 12:14h

Que bom !

Não esquece de marcar como resolvido.


abs
---
Eu Acredito, que ás vezes são as pessoas que ninguém espera nada que fazem as coisas que ninguém consegue imaginar.

--- Mestre dos Mestres - Alan Turing ---


20. Re: Erro ao exibir páginas HTML [RESOLVIDO]

Ygor de Souza Leite
ygorleitte

(usa Debian)

Enviado em 06/10/2015 - 00:10h


tonyhts, dá uma olhada no meu tópico, acho que você consegue me ajudar..

vlw!

http://www.vivaolinux.com.br/topico/Apache-Web-Server/Como-mudo-a-pagina-inicial-do-APACHE/?pagina=1



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts