Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Running Grav into home/public_html folder

Solved by Pedro M View solution

Started by Pedro M 5 years ago · 9 replies · 1008 views
5 years ago

Hello there.

Is possible run Grav into home/public_html folder??. I've configured Apache Userdir module, and I can load html sites, but not Grav.

What can I do to configure this?
Thanks

5 years ago

What are the errors? I have my Grav site in public_html with default .htaccess and no issues here

5 years ago

Same here. I can drop the files into public_html and it works fine.

5 years ago

Hi.
This is the error:
500
" Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."

In error.log I have:
/home/pedro/public_html/grav-admin/.htaccess: Options not allowed here

5 years ago

@pmoreno:
In error.log I have:
/home/pedro/public_html/grav-admin/.htaccess: Options not allowed here

Sounds like something in your htaccess that your host doesn't like. Try renaming it temporarily and see if that helps. I am new to Grav and haven't looked at what is in htaccess yet.

5 years ago

I've probed to delete .htaccess but it doesn't work. I'll see some information about Apache Server configuration.

5 years ago

Hi @Karmalakas

I'm using the Apache 2 and PHP provided by my Linux distribution, not XAMPP. I have this configuration in a /etc/apache2/sites-enabled/es-grav.local:

TXT
<VirtualHost *>
    DocumentRoot /home/pedro/public_html
    ServerAdmin webmaster@localhost
    ServerName es-grav.local
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined
    <Directory "/home/pedro/public_html">
        allow from all
        AllowOverride All
        Options None
        Require all granted
    </Directory>
</VirtualHost>
5 years ago

Error is in .htaccess. Look for these and try removing options setting on each one.

5 years ago Solution

Well.

Finally, I've got to setup correctly my apache configuration to work fine with user_dir module. In my **/etc/apache2/mods-enabled, I've commented these lines:

TXT
#<IfModule mod_userdir.c>
#    <Directory /home/*/public_html>
#        php_admin_flag engine Off
#    </Directory>
#</IfModule>

The route for my web sites in localhost is now: http://localhost/~user/site, with ~ before user name.

Thanks for your help.

👍 2
last edited 12/17/21 by Pedro M

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 18 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago