To give a little background information:
I have a Windows directory (Host OS) that I am sharing to CentOS (Guest OS) that serves as my local web server. For some odd reason, I cannot access any of the files in that share from a web browser. For example, if my address is http://192.168.1.200/home.html it gives me a "Forbidden: You don't have permission to view this page" error. When accessing the shared directory from Linux and try to perform a chmod -R 777 on the parent folder, I receive an access denied even running as root. The Windows side of the house has "Authenticated Users" and "Everyone" with full control. And this is with the assumption that the /etc/httpd/conf/httpd.conf is modified correctly.
Outside of this, if I just SCP the contents to the server and modify the httpd.conf file to reflect the new directory, I am able to access everything. The point of this is to be able to modify the local file on the Host OS and not having to SCP it over. Essentially, everything is updated on the server automatically when I save it on the Host OS side.
Related
For my web database I am trying to create a webserver so I need to make a conf file. When I try to edit my conf file and save it wont let me and says permission denied. I have already given myself read and write access, but I still don't have access to the edit the file. Here is the link to the resource I am using to set up my webserver : https://github.com/orsenthil/adminer-on-mac
I've been working with local web servers and mysql on Mac for over 15 years, so this recommendation is coming from that experience.
OS X updates will destroy your local web development environment every time you do a major OS update... Don't use the built in Apache, PHP and MySQL. Use Homebrew to install independent web server components.
Now to your problems:
/etc/hosts is a file not a directory. Each line is a separate record. The line they gave 127.0.0.1 apache.local just means that your local computer will be accessible from http://apache.local. This hosts file can be used to avoid DNS lookups for any website.
The conf file you are referring to is the Apache VirtualHost file? OS X is very protective about files in etc. Have you tried sudo? If you change the permissions to your user, Apache may not be able to function.
Currently connecting to a Ubuntu 14.04 LTS server from a Windows pc using WinInet.Dll.
The root folder on the server is the 'home' folder whereas the required folders/files are situated at /var/www/www.mysite.com/htdocs/.
Can retrieve directory listings, upload, download etc from subfolders of the 'home' folder but unable to determine a path to the required folders/files.
The uploading, downloading etc will be done via a Windows app that automatically and periodically updates the websites on the server.
One alternative would be to place the websites, etc in subfolders of the home folder.
Alternatively, please advise suitable path(s)?
You have to use sudo if you don't have connected with root user to access those files/folders. I don't know about Winlnet.dll , but to connect Ubuntu server you can use Putty/Kitty or other similar.
I am having trouble conecting to a mysql server that is runing on ubuntu 14.04. i can log into phpmyadmin and upload webpages via ftp but when i go to create a record set and define a database i get a 403 access forbiden. does any one have any ideas.
A 403 error doesn't mean your script is having trouble connecting to the database server, it means your client (the web browser) is not permitted to access the file/web page you're trying to access.
Most likely your permissions aren't set properly on the files you've uploaded by FTP. Check the owner and permissions and verify that they're appropriate for your situation (for instance, on my system files are 644 and directories are 755 and the file owner doesn't matter. Your mileage may vary).
I created a LAMP stack instance on Google Compute Engine and followed the instructions for setting up FTP as described here.
Most of this worked, I can view files and ftp files to my local workstation FROM the instance. The problem is I can't ftp files TO the instance. Whenever I try to do so Filezilla gives me a permission denied error.
I tried right clicking on the "www" folder in Filezilla to set the permissions but that didn't work.
I'm guessing that write permissions have to be set by SSH-ing to the server and executing some sort of command but I'm not sure how to do that.
Any ideas as to how to go about doing this would be appreciated.
By default the /var/www directory is owned by 'www-data' on the debian instance. You should add your user to the 'www-data' group, and give the directory +rw (read and write) for groups.
I am running an apache server on computer A. I use computer B with ubuntu desktop and A lamp server to develop code because it's more portable. I use ftp to put html files on computer A and they can be opened by connecting to computer A's ip via the browser, all simple enough. Now I would like via a link on my default page index.html to be redirected to an html file stored in a shared folder on computer B. Is such a thing possible and if so how can I make apache render the html page at such a location as smb://<network location>/var/www?
mkdir /var/www/remote # assuming your current document root is /var/www/
mount smb://network.host/var/www /var/www/remote/
Once you have it working you can edit /etc/fstab to make it permanent, or script step 2.
This will keep your current local server working, and allow you to access the remote path at http://127.0.0.1/remote/