"Форум на сайте Чагадаева"

Пожалуйста, войдите или зарегистрируйтесь.

Расширенный поиск  

Новости:

21 марта 2008 года 23:50
Установлен новый движок форума. Пишите отзывы...

Страницы: 1 ... 5 6 [7] 8 9 10
 61 
 : 26 Февраля 2021 года, 17:05 
Автор adc - Последний ответ от adc
Вариант 1

echo "letter text" | mail -s "subject" to_user@adc.su -f from_user@adc.su

Вариант 2

Код: (letter.txt) [Выделить]
From: from_user@adc.su
To: to_user@adc.su
Subject: subject

line1
line2
line3

cat letter.txt | /usr/sbin/sendmail -t

 62 
 : 18 Февраля 2021 года, 10:17 
Автор adc - Последний ответ от adc
Скрипт от SMF для изменения путей, URL'ов и параметров БД на уже установленном форуме - https://wiki.simplemachines.org/smf/Repair_settings.php

 63 
 : 17 Февраля 2021 года, 22:07 
Автор adc - Последний ответ от adc
Код: (gen_SSL.conf) [Выделить]
[ req ]
default_bits = 2048 # Can be 1024-4096
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no # Don't ask params, read it from file

[ req_dn ]
C=RU # Country Name (2 letter code)
ST=Russia # State or Province Name (full name)
L=Moscow # Locality Name (eg, city)
O=adc server # Organization Name (eg, company)
OU=adc ssl key # Organizational Unit Name (eg, section)
CN=adc.su # Common Name (eg, YOUR name, *.example.com is also possible)
emailAddress=tech@adc.su # Email Address

[ cert_type ]
nsCertType = server

[ v3_req ]
subjectAltName = email:copy,DNS:adc.su,DNS:ns.adc.su,DNS:212.109.199.94

Код: (gen_SSL_Cert-Key) [Выделить]
#!/bin/sh
#######################################################################
###  Generates a self-signed certificate  #############################
#######################################################################


SSL_dir=./
SSL_config=$SSL_dir/gen_SSL.conf

CERT_file=$SSL_dir/server_cert.pem
KEY_file=$SSL_dir/server_key.pem

if [ -f $CERT_file ]; then
  echo "$CERT_file already exists, won't overwrite"
  exit 1
fi

if [ -f $KEY_file ]; then
  echo "$KEY_file already exists, won't overwrite"
  exit 1
fi

/usr/bin/openssl req -new -x509 -days 365 -nodes -extensions v3_req -config $SSL_config -out $CERT_file -keyout $KEY_file || exit 2
chmod 0600 $KEY_file
echo
/usr/bin/openssl x509 -subject -fingerprint -noout -in $CERT_file || exit 2

 64 
 : 17 Февраля 2021 года, 21:27 
Автор adc - Последний ответ от adc
Код: (/etc/rc.conf) [Выделить]
apache22_enable="YES"
apache22_http_accept_enable="YES"

#
# Virtual Hosts
#
NameVirtualHost *:80

<VirtualHost *:80>
ServerName adc.su
ServerAlias www.adc.su
DocumentRoot /srv/www/www.adc.su/htdocs
ScriptAlias "/cgi-bin/" "/srv/www/www.adc.su/cgi-bin/"
Redirect "/adc_billing.htm" "http://adc.su/works.adc_billing/"
Redirect "/b" "http://adc.su/bookmarks.html"
Redirect "/cas/" "http://adc.su/works.cas/"
Redirect "/cas" "http://adc.su/works.cas/"
ErrorLog /srv/www/www.adc.su/log/httpd-error.log
CustomLog /srv/www/www.adc.su/log/httpd-combined.log combined
</VirtualHost>

 65 
 : 15 Февраля 2021 года, 19:55 
Автор adc - Последний ответ от adc
Красивый листинг файлов
load_module /usr/local/libexec/nginx/ngx_http_xslt_filter_module.so;

 location /Files/
 {
  alias /srv/FileSharing/;
  autoindex on;
  autoindex_format xml;
  autoindex_exact_size off;
  autoindex_localtime off;
  xslt_stylesheet /srv/autoindex.xslt;
  xslt_stylesheet /srv/nginx_template.xslt path='$uri';
 }

autoindex.xslt взят с https://github.com/EvilVir/Nginx-Autoindex
nginx_template.xslt взят с https://github.com/jbox-web/nginx-index-template

 66 
 : 15 Февраля 2021 года, 18:42 
Автор adc - Последний ответ от adc
Перенаправить http запросы на https сервер
server
{
 listen 80;
 server_name aokp.ru;
 return 301 https://$host$request_uri;
}


Перенаправить запросы к домашним каталогам пользователей на Apache
location ~ ^/~(.+?)(/.*)?$
 {
  proxy_pass http://127.0.0.1;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_cache off;
 }

 67 
 : 15 Февраля 2021 года, 01:29 
Автор adc - Последний ответ от adc
Создание пользователя и базы данных для форума
CREATE DATABASE `www_adc_su` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON `www_adc_su`.* TO 'www_adc_su'@localhost IDENTIFIED BY '12345';
FLUSH PRIVILEGES;

Загрузка из файла в MySQL
mysql www_adc_su <www_adc_su_dump.sql

★  ★  ★

Выгрузка из MySQL в файл
mysqldump --compact www_adc_su | xz -8 > bkp_`hostname`_`date +%Y.%m.%d_%H.%M`.xz

 68 
 : 23 Июля 2010 года, 22:27 
Автор adc - Последний ответ от adc
Код: (apache2.conf) [Выделить]
    <Directory "/srv/www/admin.aokp.ru/htdocs">
AuthType Basic
AuthName "Billing System"
AuthBasicProvider file
AuthUserFile /srv/www/admin.aokp.ru/htdocs/.htpasswd
Require valid-user
    </Directory>

Создать файл с паролями, прописать туда пользователя user с паролем pass
htpasswd -c -b /srv/www/admin.aokp.ru/htdocs/.htpasswd user pass

Добавить в существующий файл с паролями пользователя user1 с паролем pass1
htpasswd -b /srv/www/admin.aokp.ru/htdocs/.htpasswd user1 pass1

★  ★  ★
Код: (apache2.conf) [Выделить]
    <Location />
AuthType Digest
AuthName "Billing System"
AuthDigestDomain / http://admin.aokp.ru/
AuthDigestProvider file
AuthUserFile /srv/www/admin.aokp.ru/htdocs/.htdigest
Require valid-user
    </Location>

Создать файл с паролями, прописать туда пользователя user
htdigest -c /srv/www/admin.aokp.ru/htdocs/.htdigest "Billing System" user

Добавить в существующий файл с паролями пользователя user1
htdigest -c /srv/www/admin.aokp.ru/htdocs/.htdigest "Billing System" user1

 69 
 : 07 Февраля 2021 года, 21:40 
Автор adc - Последний ответ от adc
Код: (/boot/loader.conf) [Выделить]
#######################################################################
###  Variables to change the default load behavior of system  #########
#######################################################################

# Created:
# Modified: 2012.04.25, 2012.12.27, 2013.02.11


###  Loader settings  #################################################
loader_logo="beastie"
autoboot_delay="3"


###  Serial ports  ####################################################
uart_load="YES"

###  Network cards  ###################################################
miibus_load="YES" # miibus support, needed for some drivers
if_bge_load="YES" # Broadcom BCM570x PCI Gigabit Ethernet

###  Network protocols  ###############################################
if_vlan_load="YES" # IEEE 802.1Q VLAN network interface
alias_ftp_load="YES"

###  Other modules  ###################################################
aio_load="YES" # Async IO system calls
coretemp_load="YES" # Intel Core CPU temperature monitor


Код: (/etc/fstab) [Выделить]
# Device Mountpoint FStype Options Dump Pass#
/dev/gpt/rootfs / ufs rw,noatime 1 1
md99 none swap sw,file=/swap-file,late 0 0
/dev/cd0 /mnt/cdrom cd9660 ro,noauto 0 0
/dev/ad0s1 /mnt/c ntfs ro,-Ckoi8-r,-m644 0 0
/dev/da0s1 /mnt/flash msdosfs rw,noauto,-Lru_RU.KOI8-R,-DCP866,-m660 0 0


Код: (/etc/make.conf) [Выделить]
# Created:  2010.10.26 10:50
# Modified: 2013.01.04, 2013.02.01


CPUTYPE= pentium4
CFLAGS= -O2 -fno-strict-aliasing -pipe
CXXFLAGS+= -fconserve-space
BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings

# Kernel build flags
COPTFLAGS= -O -pipe

# Do not build modules with the kernel
NO_MODULES=

# Do not install symbol files with kernel modules
INSTALL_NODEBUG=

BOOTWAIT= 12000
TOP_TABLE_SIZE= 101

# Для каких локалей устанавливать справочные руководства
DOC_LANG= en_US.ISO8859-1 ru_RU.KOI8-R

# Working directory for ports
WRKDIRPREFIX=/usr/obj


Код: (/etc/src.conf) [Выделить]
# Created:  2010.10.26 11:58
# Modified: 2013.01.10


WITHOUT_ACCT= # do not build process accounting tools such as ac(8) and accton(8)
WITHOUT_AMD= # do not build amd(8), and related programs
WITHOUT_ASSERT_DEBUG= # do not compile programs and libraries without the assert(3) checks
WITHOUT_ATM= # do not build programs and libraries related to ATM networking
WITHOUT_AUDIT= # do not build audit support into system programs
WITHOUT_BLUETOOTH= # do not build Bluetooth related stuff
WITHOUT_CALENDAR=
WITHOUT_CTM= # do not build ctm (originally `Cvs Through eMail') utility
WITHOUT_CVS= # do not build CVS
WITHOUT_DICT= # do not build the Webster dictionary files
WITHOUT_GAMES= # do not build games (games/ subdir)
WITHOUT_GDB= # do not build GDB
WITHOUT_GPIB= # do not build GPIB support
WITH_IDEA=
WITHOUT_INFO= # do not make or install info files
WITHOUT_IPFILTER= # do not build IP Filter package
WITHOUT_IPX=
WITHOUT_KERNEL_SYMBOLS= # do not install kernel symbol files
WITHOUT_NIS= # do not build NIS support and related programs
WITHOUT_PROFILE= # Avoid compiling profiled libraries
WITHOUT_SENDMAIL= # do not build sendmail and related programs
WITHOUT_SHAREDOCS= # do not build the 4.4BSD legacy doc
WITHOUT_ZFS=

 70 
 : 19 Февраля 2011 года, 01:10 
Автор adc - Последний ответ от adc
Сохранение позиции файла встроенным просмоторщиком
Код: (файл ~/.config/mc/ini) [Выделить]
mcview_remember_file_position=1

Не делать отступы при вставке текста из буфера обмена (судя по всему, в современных версиях неактуально)
Код: (файл ~/.config/mc/ini) [Выделить]
editor_return_does_auto_indent=0


Проблема: не запускается после установки (на FreeBSD)
Решение:
mkdir /usr/local/libexec/mc/fish

Страницы: 1 ... 5 6 [7] 8 9 10