Reputation: 376
I am install a new project of the OctoberCMS in my VPS in a subfolder, example, /var/www/myCMS/ (here this my installation of the OctoberCMS).
When I access my site by domain example: www.mydomain.com/myCMS/ I having a image of the welcome demo, picture bottom:
But which accessing the Backend (www.mydomain.com/myCMS/backend I have this error:
Any solution?
My system is: - Apache2 - Ubuntu 16.04
Upvotes: 0
Views: 971
Reputation: 1430
In case any of the already mentioned methods don't work check your project directory if you have .htaccess file in case if you are using apache server else create one sudo nano .htaccess or sudo vim .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
##
## You may need to uncomment the following line for some hosting environments,
## if you have installed to a subdirectory, enter the name here also.
##
# RewriteBase /
##
## Black list protected files
##
RewriteRule ^themes/.*/(layouts|pages|partials)/.*.htm /index.php [L,NC]
RewriteRule ^uploads/protected/.* /index.php [L,NC]
RewriteRule ^bootstrap/.* /index.php [L,NC]
RewriteRule ^config/.* /index.php [L,NC]
RewriteRule ^vendor/.* /index.php [L,NC]
RewriteRule ^storage/cms/.* /index.php [L,NC]
RewriteRule ^storage/logs/.* /index.php [L,NC]
RewriteRule ^storage/temp/.* /index.php [L,NC]
RewriteRule ^storage/framework/.* /index.php [L,NC]
##
## White listed folders and files
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} !\.js
RewriteCond %{REQUEST_URI} !\.map
RewriteCond %{REQUEST_URI} !\.ico
RewriteCond %{REQUEST_URI} !\.jpg
RewriteCond %{REQUEST_URI} !\.jpeg
RewriteCond %{REQUEST_URI} !\.gif
RewriteCond %{REQUEST_URI} !\.css
RewriteCond %{REQUEST_URI} !\.less
RewriteCond %{REQUEST_URI} !\.scss
RewriteCond %{REQUEST_URI} !\.pdf
RewriteCond %{REQUEST_URI} !\.png
RewriteCond %{REQUEST_URI} !\.swf
RewriteCond %{REQUEST_URI} !\.txt
RewriteCond %{REQUEST_URI} !\.xml
RewriteCond %{REQUEST_URI} !\.xls
RewriteCond %{REQUEST_URI} !\.eot
RewriteCond %{REQUEST_URI} !\.woff
RewriteCond %{REQUEST_URI} !\.woff2
RewriteCond %{REQUEST_URI} !\.ttf
RewriteCond %{REQUEST_URI} !\.svg
RewriteCond %{REQUEST_URI} !\.wmv
RewriteCond %{REQUEST_URI} !\.avi
RewriteCond %{REQUEST_URI} !\.mov
RewriteCond %{REQUEST_URI} !\.mp4
RewriteCond %{REQUEST_URI} !\.webm
RewriteCond %{REQUEST_URI} !\.ogg
RewriteCond %{REQUEST_URI} !docs/.*
RewriteCond %{REQUEST_URI} !themes/.*
RewriteRule ^ index.php [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /index.php [L]
after pasting above configuration in the file save and close and restart apache server
sudo service apache2 restart
Upvotes: 0
Reputation: 9693
sometime default apache
installation is not come with mode rewrite enabled( as you described its your vpn)
so you need to enabled rewrite module manually
use this 2 commands to enable
rewrite module
and restart apache
a2enmod rewrite
service apache2 restart
then just check that your directory have .htaccess
in order to redirect all request to the index.php
in your apache server
you need this things
<Directory /var/www/html/example.com/public_html>
Options Indexes FollowSymLinks
# this is needed to work .htaccess
AllowOverride All
Require all granted
</Directory>
Upvotes: 1