Hi everyone
Even following all possible documentation, I could not:
1. create virtual host's for my different sites;
2. allow access to the mysql database through Sequel Pro (or MySQL Tools) - only phpMyadmin.
Step by step.
1. Creating virtual host's:
- In "lampp / etc / httpd.conf", I uncommented the line:
# Virtual hosts
Include etc / extra / httpd-vhosts.conf
- In "lampp / etc / extra / httpd-vhosts.conf", I created the virtual directories
<VirtualHost *: 80>
DocumentRoot "/ opt / lampp / htdocs"
ServerName localhost
ServerAlias localhost
ErrorLog "logs / localhost-error_log"
CustomLog "logs / localhost-access_log" common
</ VirtualHost>
# "/ topdesk / httpdocs" would be one of the sites
<VirtualHost *: 80>
DocumentRoot "/ opt / lampp / htdocs / topdesk / httpdocs"
ServerName topdesk.local
ErrorLog "logs / topdesk-error_log"
CustomLog "logs / topdesk-access_log" common
</ VirtualHost>
Xampp -> open terminal -> command "apachectl -S" results:
VirtualHost configuration:
*: 80 is a NameVirtualHost
default server localhost (/opt/lampp/etc/extra/httpd-vhosts.conf:1)
port 80 namevhost localhost (/opt/lampp/etc/extra/httpd-vhosts.conf:1)
alias localhost
port 80 namevhost topdesk.local (/opt/lampp/etc/extra/httpd-vhosts.conf:9)
ServerRoot: "/ opt / lampp"
Main DocumentRoot: "/ opt / lampp / htdocs"
Main ErrorLog: "/ opt / lampp / logs / error_log"
Mutex ldap-cache: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir = "/ opt / lampp / logs /" mechanism = default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/opt/lampp/logs/httpd.pid"
Sets: DUMP_VHOSTS
Defines: DUMP_RUN_CFG
Defines: MODPERL2
User: name = "daemon" id = 1
Group: name = "daemon" id = 1
In the browser:
http: // localhost: 8080 -> ok (Xampp dashboard)
http: // localhost: 8080 / topdesk / httpdocs -> ok (site)
http: // localhost -> browser does not connect -> localhost-error.log empty
http: //topdesk.local -> browser does not connect -> topdesk-error.log empty
2. I configured Sequel Pro as described in lampp / etc / my.cnf file:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
Sequel Answer:
Can not connect via socket, or the request has expired
Double-check that the socket path is correct and that you have the necessary privileges, and that the server is running
MySQL reported: Can not connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
Note:
- I uncommented the #password line and put my real password in the my.cnf file. Same result.
- External access to phpmyadmin is ok.
- By checking the security of Xampp, I see that external access to MySql is blocked ... and I do not know how to undo it.
root @ debian: ~ # / opt / lampp / lampp security
XAMPP: Quick security check ...
XAMPP: MySQL is not accessible via network. Good.
XAMPP: MySQL has a root passwort set. Fine!
XAMPP: ProFTPD has a new FTP password. Great!
XAMPP: Do you want to change the password anyway? [no] no
XAMPP: Done.
Any idea?
Regards,
Carlos Freire