LibArea / libarea

A platform for collective blogs and social media platform, forum, question and answer service (Q&A). Catalog of sites (programs), site navigation and directories - facets. A community based on the PHP HLEB micro-framework.
https://libarea.ru
MIT License
101 stars 26 forks source link

not website #6

Closed joywebpro closed 2 years ago

joywebpro commented 2 years ago

Привет, Я не могу получить доступ к сайту локально. "Окна" Вместо этого у меня отображаются все файлы, как я могу увидеть сайт? index

evgip commented 2 years ago

Привет.

Вам необходимо изменить путь в настройках сервера к папке: public (веб-корень Apache).

Пример конфигурации для XAMPP, PHP 8.1.2, httpd-xampp.conf:

<VirtualHost *:80>
    ServerAdmin webmaster@lib.loc
        DocumentRoot "d:/xampp/htdocs/lib.loc/public"
        ServerName lib.loc
    ServerAlias www.lib.loc
    ErrorLog "d:/xampp/htdocs/lib.loc/error.log"
        CustomLog "d:/xampp/htdocs/lib.loc/access.log" common
    <Directory "d:/xampp/htdocs/lib.loc/public">
        Require all granted
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost> 

@joywebpro Возможно этот материал может помочь.

Почему index.php находится в папке public?

joywebpro commented 2 years ago

Hello. In Local php 8.0.13 it's ok ;) I have the website, but when I want to connect: ss@sdf.ru with password, I have "Protected from CSRF" and in "search" this is a blank page.. and online, php 8.1, no website. ... Online: ovh apache 2.4. How to config "PUBLIC" online? AND the French language is bad in local ^^

evgip commented 2 years ago

Hello, @joywebpro

On the local, you need to comment out these 2 lines in the file: public/.htaccess

# php_value session.cookie_httponly 1
# php_value session.cookie_secure 1

On live hosting, this will work by default.

AND the French language is bad in local ^^

app/Language/fr.php

This needs to be corrected. The translation is not very good and needs to be improved.

joywebpro commented 2 years ago

Hello @evgip So, I don't understand all, in local, when I delete

php_value session.cookie_httponly 1 php_value session.cookie_secure 1 I can connect.

And in my hosting, I always have the folders instead of the website.

evgip commented 2 years ago

@joywebpro Perhaps you should also specify the public directory in the hosting settings, as you did locally. Hosting support usually knows what the conversation is about and I think they can help with it.