Creating a conf file for a web server - mysql

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.

Related

Remote hosts password file PhpStorm linux

Was using PhpStorm 2017 version then the macbook died.
I never did a backup or exported any password.
I'm on a new machine and want to import the existing remote host passwords
I read some answers like
https://intellij-support.jetbrains.com/hc/en-us/community/posts/207074025-webServers-xml-format#5275025
https://youtrack.jetbrains.com/issue/IDEA-170108
They talk about using keepass or keychain, but it's too generic, what are the exact steps? And is there a way to use them at all if the original computer is dead and I only have access to the HD? How do I use them to "move" passwords to the new machine? OS is Mojave
In my case the following worked
On the dead computer take copy the file login.keychain in ~/Library/Keychains folder (it may be a hidden folder)
⁩On the new computer open utilities > Keychain access
File > Add keychain
Select the file you copied (recommended you rename first to avoid confusion)
If you're missing the hostnames in phpstorm they're stored in
~/Library/Preferences/PhpStorm2018.2/options/webServers.xml

Syncing (sharing) xampp mysql database over multiple machines on mac Sierra

I want to sync (share) A MYSQL database over several computers. My strategy here is to move the database to a DropBox directory so it can be used on multiple machines. I have found a clear description of how to do this on Windows, but the location of the database in the XAMPP directory and the names and locations of the mysql configuration files (my.ini on Windows, my.cnf on mac) are different. The config file directives are different enough that I couldn't get it to work on the mac simply by comparing the changes made in the Windows file.
I tried moving the MYSQL database and changing the my.cnf file as it made sense to me to direct the software to the new location and was unable to get it to work. I also tried leaving the config files along and attempting to redirect xampp with a symlink in the directory where it looked for the database folder. In neither case could I get xampp to fire up mysql.
I have had inconsistent success using symlinks with xampp, using them primarily to redirect xampp to a new php localhost directory. In this case I couldn't get it to do this with mysql.
Does anyone know how to do this, i.e. which setting in the my.cnf file need to be redirected (I've tried about every variation I could think of) or how to get it to follow a smylink to the alternative directory?
Thanks in advance for any help.
--Kenoli
if you are on a Local Area Network you can simply use one of your PCs as a mysql server and connect to the database using the local IP address. If not, I solved this using Hamachi, and using the Hamachi ip address of the pc you want to use as a server. I know this is not a direct response about the symlinks and DropBox, but it solves the problem.

How can I have apache load and display folders stored in a shared folder on another machine?

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/

Connecting XAMPP to a domain and adding files

What I need is a web server hosting just for saving large files on it and share it online, so today I downloaded XAMPP Control Panel V3.2.1 as I read on a topic that it can help me.
Actually, I don't have enough knowledge about XAMPP, can I use it to upload files with normal domain(like: www.mydoamin.com/myfile)?, how can I connect the server I build with a domain after purchasing it? and how can I upload files to this domain.
Till now I done all the needed setup, and here's what I get when I start the application:
Also I can use the "MySQL" in the webpage after log-in, and here's how the page looks like:
Is there any recommendation for other application that helps me uploading files to my own domain/server and share it, if this one isn't for these stuff?
XAMPP is software bundle containing cross OS solutions (X) for webserver Apache (A), MySQL database (M), and server-side language PHP (P) and Perl (P).
If you got a domain you need to redirect it to IP on which this XAMPP server works. To do it call/mail your domain registrator (a company that sold you a domain) and ask about it. It involves DNS (Domain Name Server) configuration - ask them how to change DNS to direct it to your XAMPP server.
PS To add files go to htdocs direcotry in your XAMPP instalation or whatever you defined to store files (and websites) and drop your files in there.
As I can see you are not experienced in that kind of things so maybe ask company that sold you a domain name about "shared hosting"? It's preconfigured ready to go server where you send files over FTP

Can I run (XAMPP) MySQl inside my DropBox folder?

Lots of conflicting reports out there when I google; can anyone help?
Basically I want to have the same databases available at work & home PCs, for development porpoises only.
I will only ever be physically at one PC (with a 45 minute trip between) and only then will there be database access. The MySql service will be running on both, but only one will be write/reading the database. Both run Windows 7
I don't need to bother with symlinks, junctions, etc as I have enough space in my DropBox to install all of Xampp there.
Can I do that without corruption?
I use something similar as part of my remote development testing, I have never tried to run a large set of data from this or a production database. Haha, but for testing queries and setting up a couple rows, etc... I use something very similar with little to no problems.
I believe that you can run the portable xampp and mysql from your Dropbox just go to www.portableapps.com to get the xampp and also download the portable launcher from the link on the page.
Let XAMPP server run on your computers, and the data folder saved on your cloud (DropBox, SkyDrive, etc).
You should install XAMPP portable on your root folder (c:) that is the same on all computer you use, then you can move XAMPP data folder (xampp Apache htdocs) and MySQL data (xampp Mysql/data) folder to Dropbox.
Do not use XAMPP installer, but use the portable one.
Configure the folder settings on both Apache and MySQL config file:
C:\xampp\apache\conf\httpd.conf
C:\xampp\apache\conf\extra\httpd-ssl.conf
C:\xampp\apache\conf\extra\httpd-xampp.conf
C:\xampp\mysql\bin\my.ini
Do the same with other server that you use (PostgreSQL, etc).
Make sure that you:
Always turn off XAMPP server after using on each PC.
Always sync Dropbox before changing PC, that is before logging on and after logging off on different computer.
Mind host / local domain variable on each computer.
Its probably better to use same username for all computer you want to use to run the data folder.
Other method is using PortableAppas.com, that is running the apps directly from USB.