I decided to put an AWS related Q here after having asked on aws dev forum and did not find a solution.
I have also followed the steps given on a repeat question here
Can someone please tell me where I am making the wrong move.
My EC2 instance is in us-west-1c (linux) and has phpmyadmin installed in it.
My RDS is also in us-west-1c
My security grp common to EC2 and RDS has http/ssh/mysql ports configured.
I am able to connect to my rds from my instance using mysql_connect() in php,
but if I give my rds endpoint as a host in phpmyadmin (config.inc.php) it does not respond.
This is how my config.inc.php looks like
$cfg['Servers'][$i]['host'] = 'xx.amazonaws.com';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = true;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'xxx';
$cfg['Servers'][$i]['password'] = 'xxx';
Am I missing something here ?
thank you very much in advance
You have to allow outside connections in the httpd conf:
sudo nano /etc/httpd/conf.d/phpmyadmin.conf
Update it to:
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Allow from all
</Directory>
Then restart apache
sudo service httpd restart
You only need to update the following in the phpmyadmin/config
sudo nano /usr/share/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = 'somerandomtext';
$cfg['Servers'][$i]['host'] = 'xxx-your-service-host.rds.amazonaws.com';
Hope this helps.
Related
I have installed Magento in my personal laptop with XAMP (windows 10) all looks good. Followed the same steps on another laptop and not able to get Magento running.
Found that port 80 is occupied in the new laptop and configured xamp with port 8090, Apache, Phymyadmin and all works good. Following is my configuration for virtual hosts file
<VirtualHost *:8090>
DocumentRoot "C:/M/xampp8.1/htdocs/magento2/pub"
ServerName kumar.magento245.com
</VirtualHost>
<VirtualHost *:8090>
DocumentRoot "C:/M/xampp8.1/htdocs"
ServerName localhost:8090
</VirtualHost>
Following in windows hosts file
127.0.0.1:8090 kumar.magento245.com
XAMP Apache running on port 8090
when i enter kumar.magento245.com gives 404 error
I assure you the rest of the installation is in sync with my earlier laptop (that dont have any service running on port 80 and i dint changed the hosts file)
Kindly please advise what to be done..
Not planning to change/edit the service running on port 80 .
when i enter kumar.magento245.com gives 404 error.. it should got my local magento running ( installed at C:/M/xampp8.1/htdocs/magento2/pub )
I followed a response in the following thread #Raz0rwire and solved my issue.
Set up virtual hosts on Apache (XAMPP, Windows 10)
accessed the url like this kumar.magento245.com:8090 port number at the end..
Welcome to SO #kumar2023,
There could be multiple possibilities for resolving this issue,
in this case, I would prefer the below steps :
Try running Magento with the direct browser URL ie. https://yourmagnetopath/pub and ensure at least my Magento has been installed
correctly
Try removing the default ports and their entries, in my case well I am using ubuntu hence there could be a case of caching if you tried multiple times with the same URL.
Try with the incognito browser or I would prefer a new browser where you haven't tried to run this URL.
Just give a try with the newer domain (again there could be a reason for caching)
I'm trying to run Laravel project on AWS EC2. It was working fine until uploaded a new version to deploy. All routes return error 404 except for '/' though all routes exist. httpd.conf in /etc/httpd/conf contains this
<Directory "/var/www">
AllowOverride All
# Allow open access:
Require all granted
</Directory>
I always execute these commands after deploying a new version
sudo chown -R ec2-user /var/app/current
sudo chmod -R 755 /var/app/current
I tried "sudo a2enmod rewrite" but I get "sudo: a2enmod: command not found"
Any solution?
Replacing the instance and re-deploying the app solved the problem
After modifying /etc/httpd/conf/httpd.conf
You need to also restart httpd using sudo service httpd restart
Refer to Laravel ReST API URL 404 not found on AWS EC2 in Apache + mySQL environment - The request URL was not found on this server
I just started using Homestead today and so far I don't think I know what I am doing, previously I was using the inbuilt PHP server that comes with Laravel and I had MySQL server and workbench installed separately on my computer.
With this setup I was able to connect to my database with ease, however since I got my Homestead running I can't seem to access that database again. This error keeps popping up:
3/3 ErrorException in Connector.php line 47: SQLSTATE[HY000] [1045]
Access denied for user 'myproject_db101'#'localhost' (using password: YES)
(View: /home/vagrant/Projects/myproject/resources/views/layout/index.blade.php)
(View: /home/vagrant/Projects/myproject/resources/views/layout/index.blade.php)
How can I fix this?
I was facing the same issue and I tried below steps to fix it. Please let me know if they work for you.
Note the homestead ip address for your vagrant box. It is available in Homestead.yaml file under ~/.homestead directory. This directory location would be different on different OS. But since you have already installed vagrant with homestead you should know its location. For me the ip address was 192.168.10.10.
Open up the Mysql Connection wizard and provide the below settings
hostname = 192.168.10.10
port = 3306
username = homestead
password = secret
Test Your connection
For me these settings worked. Check if they work for you.
These other answers might have worked for you guys, but in case anyone has a case like mine, I'm just going to provide what worked for me. Hopefully it helps someone out. I'm working on a brand new homestead installation as of today, but on a very old mac in case thats relevant.
What worked for me was using the regular localhost ip of my machine as the host, and then the homested/secret combination for the password, and using the default port but with a 0 at the end.
This adds up to be the following settings:
Connection method: Standard (TCP/IP)
Host: 127.0.0.1
Username: homestead
Password: secret
Port: 33060
Hopefully this helps someone out. Its the only configuration that worked for me.
Try using homestead's default MySQL credentials: User: root Password: secret
If you are accessing the database from your computer via MySQL Workbench (not from within the homestead VM), you can use localhost:33060 (note: non-standard port). This is mapped to port 3306 within your VM.
From your application and any time you're working from within the homestead VM, you can connect to the database normally as localhost on port 3306.
Very likely a configuration issue. Either the user 'myproject_db101'#'localhost' has no password set or is not allowed to connect from localhost. You need another user with proper rights (e.g. the root user) to fix permissions for that user.
Unable to access the homestead database through MYSQL workbench Please help me out to solve this issue
error messages at time of testing the connection - "Failed to Connect to MySQL at 127.0.0.1:33060 with user homestead Lost connection to MySQL server at 'reading initial communication packet', system error: 0"
please take a note that
Bind address in my.cnf file is 127.0.0.1 (my.cnf file located at /etc/mysql/)
hosts file contains: 127.0.0.1 localhost projectname (which is located at /etc/)
I have tried changing bind address to 0.0.0.0 but it was also not worked.
Actually I was keep trying to setup the database connectivity by just considering the homestead environment ... But on Keep searching I found one link http://www.acnenomor.com/171821p1/laravel-homestead-vagrant-box-database-problems from where I got idea and I tried once again with the data shown in attached image and it worked for me ... so I am sharing this answer in general .. it may help someone...
Please take a note that I have also tried to connect the database of Laravel homestead environment by installing all the stuffs in other system too and it was worked fine as described in the official document.. so in my case it might be the problem of some changes in configuration file of mysql or any other related environment... so please first go through the official document... http://laravel.com/docs/4.2/homestead#daily-usage
The first thing you need to do is
vagrant up
and then use these connections below for a default homestead installation.
Connection Method: Standard (TCP/IP)
Hostname: 127.0.0.1
Port: 33060
Username: homestead
Password: secret
Try the alternate IP of 192.168.10.10
hostname = 192.168.10.10
port = 3306
username = homestead
password = secret
This works for me on Windows 10 Home Version 20H2 OS Build 19042.1165 (To find this information navigate to Start, Type 'About' and click 'About your PC').
ran into a similar problem while trying to use SQLyog on my windows machine to connect to mySQL on a Homestead environment. I was able to resolve this issue by adding
skip-name-resolve
to the VMs /etc/mysql/my.conf file.
Apparently (according the mysql error logs) connections from the local machine were coming from '10.0.2.2', which caused the warning "IP Address '10.0.0.2' could not be resolved".
You will need to re-add this line every time you spin up the environment.
I want to host two odoo instances or database (?), in order to be sure that everything is separated, on a rented VPS for my wife firm and mine.
We both have a domain name.
I need the following thing :
- Browsing www.mywifedomainname.tld leads to my wife's odoo
- Browsing www.myowndomainname.tld leads to my odoo instance
Can you advise me what to do :
1 - Do I need a reverse proxy to have multi domains leading to multi instances ?
2 - In case the reverse proxy is the solution, do you know a good tutorial on how to setup it on Debian (or another distribution) ?
3 - Should I have 2 instances of Odoo or only 2 databases ?
Thanks for you interest :)
yes i have realized this on my server.
to achieve that goal I have tested two ways. It's up to you wich one is better to feet on your needs
1 method is odoo+wsgi+appache2
2 method is odoo+nginx+SSL
both cases required the proxy reverse.
so lest go on.
I assume that you know how to install odoo and postgress
mandatory requirement:
you should have hardware that can handle odoo postgress and webserver for more than one instance. As of every instance of odoo creates it's own processes. My server (6 core CPU, 3 gb Ram, and i have cpu load around 5% and RAM for 40%, i have 6 different instances rub=ning on this server with different domain names)
for each instance you should have different user created for odoo and for PostgreSQL
in case of using first method odoo+wsgi+appach you don't ned to configure openerp-server.conf file and sturtuo script as of we gonna use openerp-wsgi.py file as a configuration and the appache to sturt odoo.
/YOUR_ODOO1_PATH/openerp-wsgi.py modification with your data:
conf['addons_path'] = 'LINK TO YOUR ODOO1 ADDONS FULL PATH FROM THE ROOT'
admin_passwd = 'ODOO1 MASTR ADMIN PASSWORD'
conf['db_user'] = 'ODOO1_POSTGRESQL_USER_NAME'
conf['db_password'] = 'ODOO1_POSTGRESQL_USER_PASSWORD'
bind = '0.0.0.0:8070'
pidfile = '.gunicorn.pid'
workers = 4
timeout = 240
max_requests = 2000
conf['logfile'] = '/var/log/ODOO1/wsgi-pyton.log'
THAT WILL RUN YOUR ODOO1 instance on port 8070
for each instance you should use DIFFERENT PORT
now it is time to configure appache server:
I assume that you have installed apache server
but in any case, to do that use
sudo apt-get install apache2
and for mod WSGI
sudo apt-get install libapache2-mod-wsgi
Enable required apache modules:
sudo a2enmod proxy_http headers rewrite wsgi
If the system miss some of them you should install this modules first then enable them. More you will find in the Apache website.
Create Configuration file in apache for reverse proxy for site odoo1.com:
sudo nano /etc/apache2/sites-available/odoo1.conf
<VirtualHost *:80>
ServerName odoo1.com
ErrorLog /var/log/odoo1/openerp-error.log
CustomLog /var/log/odoo1/openerp-access.log combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass / **odoo1_full_URL**
ProxyPassReverse / **odoo1_full_URL**
ProxyVia On
LogLevel warn
</VirtualHost>
odoo1_full_URL replace with http : // odoo1.com: 8070 (for me it is not allowed to post more than 2 url, that way i have write in this way without spaces)
5. Create Site Configuration file to run WSGI script
sudo nano /etc/apache2/site-available/odoo1-wsgi.conf
With following content
<VirtualHost *:80>
ServerName odoo1.com
WSGIScriptAlias / /YOUR_ODOO1_PATH/openerp-wsgi.py
WSGIDaemonProcess oe user=ODOO1_USER group=ODOO1_USER processes=2 pythonpath=/YOUR_ODOO1_Path/ display-name=apache-ODOO1USER
WSGIProcessGroup oe
ErrorLog /var/log/ODOO1/odoo1-wsgi-error.log
CustomLog /var/log/ODOO1/odoo1-wsgi-access.log combined
<Directory /YOUR_ODOO1_PATH>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
finaly enable your odoo1 and odoo1-wsgi configuration sites and restart apache server
sudo a2ensite odoo1-wsgi.conf odoo1.conf
sudo service apache2 restart
that's all by typing in the url the odoo1.com you will be able to see your database without port number in the address bar.
do the same for any other instance and enjoy.
Let me know if you will have questions.
teh second method I will explain in my next post.