Problem with accents and port on localhost

-1

Does anyone know how to configure charset?

The problem is that it looks like this:

  

Information

Image:

And another, my localhost is in: http://localhost:8888 , where do I set to leave only http://localhost ?

    
asked by anonymous 11.03.2015 / 23:18

1 answer

3

These are two questions of a very different nature, but posted as one, it would be interesting that the next ones were done separately. Anyway, there goes:

Defining the Apache charset headers:

In the "httpd.conf" file you need this entry:

AddDefaultCharset utf-8

(or iso-8859-1, if you prefer, etc.) The most appropriate depends on the purpose of your application, I will not enter into this merit in this answer)

The location of the file varies from distribution to distribution, for example /private/etc/apache2/httpd.conf , or part of Linux in /etc/httpd/conf .

It's important that if you also set charset in your HTML files, keep them consistent with Apache's charset to avoid unexpected results.


To access the server without specifying port:

By default, the HTTP port is 80, and HTTPS is 443.

If you want to use any port other than these, you really need to enter the URL in the server: port format.

In Apache, this is set by default in:

Listen 80

or even

Listen ENDERECO_IP:80

for virtual hosts, after the : of these policies

<VirtualHost *:80>
    
12.03.2015 / 00:23