Kontakt:Telefon: {{ jednostka.tel1 }}
Email: {{ msg.odkogo }}
|
Kontakt:Telefon: {{ jednostka.tel1 }}
Email: {{ msg.odkogo }}
|
Kontakt:Telefon: {{ jednostka.tel1 }}
Email: {{ msg.odkogo }}
|
Kontakt:Telefon: {{ jednostka.tel1 }}
Email: {{ msg.odkogo }}
|
sudo apt-get install php5-xdebug
zend_extension="/usr/lib/php5/20121212/xdebug.so" xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.max_nesting_level=300
sudo service apache2 restart
javascript:(/** @version 0.5.2 */function() {document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';})()
javascript:(/** @version 0.5.2 */function() {document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
Uwaga! Zamiast id="/var/www/html/test" piszemy po prostu /var/www/html/test.ServerAdmin marcin.zaremba@gmail.com ServerName test.lh ServerAlias *.test.lh DocumentRoot /var/www/html/test ErrorLog /var/log/apache2/test_error.log CustomLog /var/log/apache2/test_access.log combined # enable the .htaccess rewrites AllowOverride All Allow from All Require all granted
ln -s /etc/apache2/sites-available/test_lh.conf /etc/apache2/sites-enabled/test_lh.conf
sudo ./addLocalHost.sh testa wszystkie wyżej opisane kroki wykonają się za nas i będziemy mogli cieszyć się nową lokalną domeną test.lh.
#!/bin/bash | |
# ------------------------------------------------------------------------------------ | |
# USE AT YOUR OWN RISK. Tested on Linux Mint 17.1 with apache2. | |
# CHECK COMMENTS BEFORE RUNNING | |
# | |
# This script creates localhost website folder and adds virtual domain with sufix .lh | |
# eg. "sudo ./addLocalHost.sh test" will create test.lh local domain | |
# | |
# Before run this script please view config.sh and check variables! | |
# ------------------------------------------------------------------------------------ | |
# read config file | |
source config.sh | |
# check if is set website variable | |
website="$@" | |
if [ -z "$website" ]; then | |
echo "Please add website name - eg. test" | |
echo " " | |
exit | |
fi | |
# set paths | |
pathToWebsiteDirectory=${htdocs}${website} | |
pathToIndex="${htdocs}${website}/index.html" | |
# virtual host lines; check the logs paths! | |
virtHost=" | |
<VirtualHost *:80> | |
ServerAdmin ${user_mail} | |
ServerName ${website}.lh | |
ServerAlias *.${website}.lh | |
DocumentRoot ${htdocs}${website} | |
ErrorLog /var/log/apache2/${website}_error.log | |
CustomLog /var/log/apache2/${website}_access.log combined | |
<Directory ${htdocs}${website}> | |
# enable the .htaccess rewrites | |
AllowOverride All | |
Allow from All | |
Require all granted | |
</Directory> | |
</VirtualHost>" | |
# create directory | |
echo "Create directory ${pathToWebsiteDirectory}" | |
mkdir ${pathToWebsiteDirectory} | |
# make index.html | |
echo "Create index.html: ${pathToWebsiteDirectory}" | |
touch ${pathToIndex} | |
# change permissions and owner | |
echo "Change permissions (0775) and owner ${user}:${user} to ${pathToWebsiteDirectory}" | |
chmod -R 0775 ${pathToWebsiteDirectory} | |
chown ${user}:${user} ${pathToWebsiteDirectory} | |
# add hello world to index.html | |
echo "Add hello ${website}! to ${pathToIndex}" | |
echo "hello ${website}!" >> ${pathToIndex} | |
# add virtualhost | |
echo "Add virtalhost config to apache sites-available and sites-enabled" | |
pathToWebsiteConf=${apacheSitesAvailablePath}${website}_lh.conf | |
touch ${pathToWebsiteConf} | |
echo "${virtHost}" >> ${pathToWebsiteConf} | |
ln -s ${pathToWebsiteConf} ${apacheSitesEnabledPath}${website}_lh.conf | |
# add host into hosts | |
echo "Add host into hosts file (${hostsPath})" | |
echo "127.0.0.1 ${website}.lh" >> ${hostsPath} | |
# restart apache | |
echo "Restart apache2" | |
service apache2 restart |
#!/bin/bash | |
user="marcinos" | |
user_mail="marcin.zaremba@gmail.com" | |
apacheSitesAvailablePath="/etc/apache2/sites-available/" | |
apacheSitesEnabledPath="/etc/apache2/sites-enabled/" | |
hostsPath="/etc/hosts" | |
htdocs="/var/www/html/" | |