Symlinks or Alias within a LAMPP setup running Joomla - apache

Sorry for the imprecise wording of this question however I have really hit a wall here.
I have installed XAMPP/LAMPP on a machine running Debian. I then installed joomla on the installation of LAMPP. Everything is running correctly. I am now trying to add either a symlink or an Alias to the httpd.conf file. Which httpd.conf file should I edit?
I think I have somewhat correctly added something to the relevant files becuase the access log returns this:
GET /Archived/test.html HTTP/1.1" 403 1043
Obviously i'm getting 403 errors when I try to connect to the directory. I have tried applying permissions to everywhere I could think of. Any suggestions would be extremely helpful, thanks!

Related

Getting 403 Forbidden on a webpage running on Apache HTTP server

The problem is as follows:
I've been trying to get my page running on the Oracle Cloud Instance - I installed everything required, got my files into /var/www/[websitename.com] and started the httpd process.
For some strange reason, however, the server is unable to access the files there.
Going to the page just throws a 403 Forbidden.
I've changed the owner of /var/www/* to 'apache' so at first glance, the permissions should be there.
The log however says this:
file permissions deny server access: /var/www/[websitename.com]/html/index.html
I've been trying to fix this for 2 days, and I just cannot figure it out.
There's apparently a bunch of similar questions, but none of the solutions have worked for me.
Can anyone help?
I tried changing the ownership with chmod and chown, but it did not help - the error persists.
I've also tried chown -R apache:root /var/www/html but still with no result.

Apache is forbidden some very specific pages

I have a Sites folder inside my user directory, where I put all of my apache project files, the weird thing is that I can access all of my folders, except for the main route "localhost/" which, of course, has no index.html document on it, its just folders, but I know I should be able to see something like this:
Index of Sites.
.project1
.project2
.project3
Instead, I get this
403 Forbidden
On my new job I was assigned to this Mac PC that belonged to someone else, and this person of course needed the same tools that I have been asked to download, they told me to uninstall all of that software and install it all over again (which I did), mainly the software that I'm using is an apache server with homebrew.
I have always had this problem, but I ignored it because I thought, well, do I really need to see an "index of Sites" page when I can manually change to whatever folder I want? my answer was, not really.
But yesterday they asked me to download webpack and nodeJs, and I did, so I made a dummy project with webpack that contained all of the js and config files, but it didn't have an index.html file. And surprise surprise, I got a 403 forbidden error when entering the dummy folder in localhost.
So I'm guessing that my apache for some reason is giving me 403 errors when I do not have an index.html file or an index.php file to show.
Have you ever experienced something like this?

xampp apache server error 403 access forbidden on windows10

I've installed xampp in two different pc and in both of them it gives me the same error running windows10 (both with it). Apache server runs correctly, the ports are dedicated to httpd as it's supposed but when I try to access the folder of my website project to test the html files, google chrome, firefox and explorer show me a message saying: "Error 403 - access forbidden because you don't have the right permissions". I've tried everything that is in the other similar questions here and already gave permisions to all users in my folders, even to the whole drive c:. I also modified the txt files inside the folder /apache/conf/ and didn't work. I've seen that in some questions regarding the same matter, the file httpd.conf is a little bit different with parts that I can't see in mine. Thank you so much.
Finally, I solved the problem learning some more. I post it here in case someone is starting with it like me. The point is that when you install xampp, the program has a default folder where it let's you put your projects, it's called "htdocs". So that you can work only with project folders that you create inside this "htdocs" folder. If you try to create a new folder on c:/ for example, the program will not let you access beacuase of security (everybody could access all the folders on your computer, entering your server). I hope this to be of some help for someone else. Thank you, and sorry for the newbie question.

"This webpage is not available" error after altering /www directory

I built the login functionality for a website on an AWS ec2 ubuntu with LAMP setup and it was working fine. The PHP files for this were located in /var/www/html. Then, to also allow login from an android device, I added and began working on the directory android_login_api in the /www folder. After adding several files and directories to this I noticed the website was no longer working and displayed "This webpage is not available" when I attempted to reach it. Despite completely removing android_login_api and attempting to revert the directory /www to just the way it was when it worked, this error remains.
I have spent a few days searching for a solution, but most answers pertain to the setup of apache which was already working fine for me. I tried restarting apache but neither index.php nor any other files I specify can be reached. I have also spent a lot of time trying to edit apache .conf files but with no luck.
Any ideas about what may have happened or if there is a specific path I need but may have accidentally altered would be greatly appreciated.
Most of access problems are caused by incorrect configuration of Virtual Hosts which seems like the problem here.
As you mentioned, the readable directory was /var/www/html and then you tried to access /var/www/android_login_api, which is not accessible by default and is specified in your virtual host file for the website. Location: /etc/apache2/sites-available
If you have done it different to this article, it will be difficult for anyone to help you. Don't create hosts in apache.conf. Read it before reading my answer further.
When you make changes to the virtual host, don't forget to use sudo a2ensite yoursite.com.conf as well as restarting apache service with sudo service apache2 restart after enabling the site.
The last thing that you should know about setting up websites is www directory owner. When you done making changes to files via FTP or SSH, run sudo chown www-data:www-data /var/www -R. www-data is the username like root used by Apache to allow external access. Otherwise the fiels will be accessible only with 0755 permissions by any other user and not 0644.
This is just a bunch of things essential to make changes and work with HTTP servers. Though my answer is not clear and I'm unable to point out your issue, I believe I've given you additional knowlege/consideration points to troubleshoot your issue. Drop a comment for more specifics.

Server not servering random files

I currently run on Ubuntu 14.04.1 LTS. I'm not a server admin by any means, and just really have basic setup/config knowledge. I got a virtual box so I could learn more. Unfortunately, I just took a bit of a leap and screwed everything up.
I'm running Apache2, PHP, MySQL. This morning, I got a prompt saying I could update my server. I wasn't thinking and decided to go through with it. In addition to completely screwing up my server settings, I'm pretty sure I've lost data. But first I need to get my server running properly again (and probably never update without paying someone to do it for me).
I got most things up and running, but now when I go to my site (gamersplane.com), some paths end up 404'ing, and going to the Apache 404 instead of hitting the htaccess. The way I have it setup, the htaccess should get all files (barring things like css, js, images, xml, etc), and direct it all to a file called dispatch.php which processes the url and determines what to do/load. Basically, some stuff goes to the htaccess, other stuff isn't. I'm not sure why.
Mainly, files directly under /javascript won't load, but files in subfolders of /javascript do. In addition, going to /tools (folder exists) works, but /tools/cards (folder doesn't exist) doesn't. Strangely though, /forum (folder exists) and /forum/3 (doesn't exist) both work. I can't figure out when things do or don't work (systematically).
apache.conf: http://pastebin.com/A3J4bXE3
gamersplane.conf: http://pastebin.com/TAD06h59
Update
I found out about package called javascript-common which forces /javascript to search elsewhere. I uninstalled the package, and JavaScript is now loading. I'm told I need the package, but I don't know why.
This still doesn't solve why some other paths don't work.