Server IP : 127.0.0.2 / Your IP : 18.216.82.12 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/apache2/examples/ |
Upload File : |
#!/bin/sh set -eu if [ $# != 1 ] ; then echo usage: $0 '<suffix>' exit 1 fi # the SUFFIX must not contain spaces or shell meta characters SUFFIX=$1 if [ -e /etc/apache2-$SUFFIX ] ; then echo ERROR: /etc/apache2-$SUFFIX already exists exit 2 fi echo Setting up /etc/apache2-$SUFFIX ... cp -a /etc/apache2 /etc/apache2-$SUFFIX echo Setting up /etc/init.d/apache2-$SUFFIX ... cp /usr/share/doc/apache2/examples/secondary-init-script /etc/init.d/apache2-$SUFFIX # adjust service name (this prevents us from using a simple symlink) perl -p -i -e s,XXX,$SUFFIX, /etc/init.d/apache2-$SUFFIX chmod 755 /etc/init.d/apache2-$SUFFIX echo -n Setting up symlinks: for a in a2enmod a2dismod a2ensite a2dissite a2enconf a2disconf apache2ctl ; do echo -n " $a-$SUFFIX" ln -s /usr/sbin/$a /usr/local/sbin/$a-$SUFFIX done echo echo Setting up /etc/logrotate.d/apache2-$SUFFIX and /var/log/apache2-$SUFFIX ... cp -a /etc/logrotate.d/apache2 /etc/logrotate.d/apache2-$SUFFIX perl -p -i -e s,apache2,apache2-$SUFFIX,g /etc/logrotate.d/apache2-$SUFFIX mkdir /var/log/apache2-$SUFFIX chmod 750 /var/log/apache2-$SUFFIX chown root:adm /var/log/apache2-$SUFFIX