Skip to content

Instantly share code, notes, and snippets.

<VirtualHost *:80>
DocumentRoot "/var/www/html/website/run/frontend/web"
ServerName qt.website.com
ErrorLog "logs/website_qt-error.log"
CustomLog "logs/website_qt-access.log" common
<Directory "/var/www/html/website/run/frontend/web">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
@ejoful
ejoful / centos7_install_lamp.sh
Last active November 10, 2019 06:54
centos7 install apache php56 mariadb
#!/bin/bash
# -----------------------------------------------------------------------------
# Installing Remi Repository
# -----------------------------------------------------------------------------
sudo yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# -----------------------------------------------------------------------------
# Import the RPM GPG keys for Repositories
# -----------------------------------------------------------------------------
@ejoful
ejoful / mac_install_lamp.sh
Last active November 5, 2019 14:43
mac 安装lamp脚本
#!/bin/sh
## Upgrading MariaDB
## brew update
## brew upgrade mariadb
# 安装 Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo chown -R $(whoami) /usr/local/share/man/man8
brew install cmake
@ejoful
ejoful / auth.py
Created June 15, 2017 03:20 — forked from ibeex/auth.py
Python LDAP (ActiveDirectory) authentication
import ldap
def check_credentials(username, password):
"""Verifies credentials for username and password.
Returns None on success or a string describing the error on failure
# Adapt to your needs
"""
LDAP_SERVER = 'ldap://xxx'
# fully qualified AD user name
LDAP_USERNAME = '%s@xxx.xx' % username