Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

yassin98010's avatar

apache2 and laravel , https problem

hello i have this error in my webpage :

Forbidden

You don't have permission to access / on this server.

Apache/2.4.7 (Ubuntu) Server at 157.26.83.47 Port 443

in my apache2 log file i have this :

[Thu Aug 13 11:35:25.957495 2015] [access_compat:error] [pid 2842] [client 157.26.100.53:63300] AH01797: client denied by server configuration: /var/www/html/
[Thu Aug 13 11:35:26.037809 2015] [access_compat:error] [pid 2842] [client 157.26.100.53:63300] AH01797: client denied by server configuration: /var/www/html/favicon.ico, referer: https://157.26.83.47/

in my site log file i have this i don't have any things

so my conf file file imomo.conf

NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
  ServerName 157.26.83.47
  DocumentRoot "/var/www/imomo/public"
  ErrorLog /var/log/apache2/imomo-error.log
  <Directory "/var/www/imomo/public">
    AllowOverride all
    Order allow,deny
    Allow from all
    Require  all granted
  </Directory>
</VirtualHost>


<VirtualHost *:443>
DocumentRoot "/var/www/imomo/public"
ServerName 157.26.83.47
ErrorLog /var/log/apache2/imomo-error.log
 <Directory "/var/www/imomo/public">
    AllowOverride all
    Require  all granted
  </Directory>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/crt/vhost1.crt
SSLCertificateKeyFile /etc/apache2/ssl/key/vhost1.key
<Location />
SSLRequireSSL On
SSLVerifyClient optional
SSLVerifyDepth 1
SSLOptions +StdEnvVars +StrictRequire
</Location>
</VirtualHost>
 

file ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
NameVirtualHost *:80
Listen 80

<IfModule ssl_module>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

can some one help me to find the problem plz ? my problem is only with https ! the http work well

0 likes
6 replies
Corez64's avatar

Check that Apache has permission to see the directories, Apache's user is often www-data (Debian/Ubuntu) or apache (Red Hat, CentOS, Fedora). If you run the command ls -hl /var/www/ you should have a line that looks something that looks like "drwxr-xr-x 2 [user] [group] 4.0K [timestamp] imomo" if you have the letter "r" 3 times in that random string at the start your fine.

yassin98010's avatar

@Corez64 i have this

drwxrwxrwx  2 root root 4.0K Jun  2 13:41 htm
drwxrwsrwx 11 root root 4.0K Aug 12 09:58 imomo

and with simple http request it works well , but the problem with https , and in my error.log now i have thie :

[Thu Aug 13 11:54:07.228347 2015] [mpm_prefork:notice] [pid 2981] AH00169: caught SIGTERM, shutting down
[Thu Aug 13 11:54:10.117927 2015] [ssl:warn] [pid 3051] AH01909: RSA certificate configured for 157.26.83.47:443 does NOT include an ID which matches the server name
[Thu Aug 13 11:54:10.118135 2015] [ssl:warn] [pid 3051] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Aug 13 11:54:10.173477 2015] [ssl:warn] [pid 3056] AH01909: RSA certificate configured for 157.26.83.47:443 does NOT include an ID which matches the server name
[Thu Aug 13 11:54:10.173677 2015] [ssl:warn] [pid 3056] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Aug 13 11:54:10.177252 2015] [mpm_prefork:notice] [pid 3056] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.9 OpenSSL/1.0.1f configured -- resuming normal operations
[Thu Aug 13 11:54:10.177314 2015] [core:notice] [pid 3056] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 13 11:54:14.241382 2015] [access_compat:error] [pid 3061] [client 157.26.100.53:63534] AH01797: client denied by server configuration: /var/www/html
[Thu Aug 13 11:54:14.277118 2015] [access_compat:error] [pid 3061] [client 157.26.100.53:63534] AH01797: client denied by server configuration: /var/www/html, referer: https://157.26.83.47/

and in my imomo-eroor.log i have this :

[Thu Aug 13 11:54:10.117212 2015] [ssl:warn] [pid 3051] AH01909: RSA certificate configured for 157.26.83.47:443 does NOT include an ID which matches the server name
[Thu Aug 13 11:54:10.172963 2015] [ssl:warn] [pid 3056] AH01909: RSA certificate configured for 157.26.83.47:443 does NOT include an ID which matches the server name
Corez64's avatar

Those error messages in your error logs are to do with your SSL certification not configured correctly for your server, I'm afraid I'm not familiar enough to be able to help you with that.

However if static pages are loading when PHP ones aren't it is likely that there is a PHP error that is being thrown that isn't being shown to you, in your .env file change the APP_DEBUG to true and try again. Also ensure that your storage folder (and all sub-folders) is writeable.

Corez64's avatar

Are you getting anything in your Laravel log file?

Artistan's avatar

client denied by server configuration may pertain to .htaccess rules as well.

Please or to participate in this conversation.