: Setting up a second domain to my web server I have a domain name which points to my web server, and we added a secondary domain for short urls, which points to the same ip address, however
I have a domain name which points to my web server, and we added a secondary domain for short urls, which points to the same ip address, however with the new domain, it is giving
"Forbidden
You don't have permission to access /s/Mw-- on this server."
where /s/Mw-- is the short url parameters.
I have a conf file for the new vhost and I have it like this
<VirtualHost *:80>
ServerName dom.ain
ServerAlias dom.ain DocumentRoot /var/www/html/git/project/app
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
More posts by @Becky754
1 Comments
Sorted by latest first Latest Oldest Best
A few things:
I am assuming that dom.ain is for our sake like example.com would be. I like it!
Check the directory permissions for the DocumentRoot /var/www/html/git/project/app. It should be owned for the user that controls it in Apache. It depends on how your Apache is set-up but the user could be www-data or root. If you are using virtual hosting and a control panel, then the user could be another name. The group should be the same in most cases. Also make sure that the user has read permission.
Check the file permissions for your application. The owner and group should be the same as the directory. Also check to see if your application as read and execute permissions enabled for owner, group, and other.
If you are not familiar with setting permissions, you can > man chown (change owner), > man chgrp (change group), and > man chmod to set access permissions. You may also need to check out > man ls to list files, directories, and permissions.
You may need a line like:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
This can be in an .htaccess file if you have AllowOverride enabled. Otherwise you will need to add it and tailor it for your purpose.
You may need something like:
Options +Indexes FollowSymLinks +ExecCGI
You may also need something like:
Order allow,deny
Allow from all
... or ...
Require all granted
... to allow access.
These are the common things that cause a 403 error. Let us know if this helps. We can go deeper if needed.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.