![]() |
|
DNS-Less preview - Printable Version +- Sentora Support Forums (https://senforums.mach-hosting.com) +-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5) +--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32) +---- Forum: Community Guides & How-To's v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=33) +---- Thread: DNS-Less preview (/showthread.php?tid=932) |
DNS-Less preview - TGates - 01-29-2015 Basically this is the DNS-less preview. It allows your users to view their sites while they wait for their domain to propagate. Windows: Code: </virtualhost>
# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName xxx.xxx.xxx.xxx
DocumentRoot c:/zpanel/panel/
AliasMatch ^/~([a-zA-Z0-9]+)/?(.*) c:/zpanel/hostdata/$1/public_html/$2
<Directory c:/zpanel/hostdata>
Options FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir c:/zpanel/temp
</IfModule>
</Directory>Code: </virtualhost>
# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName xxx.xxx.xxx.xxx
DocumentRoot "/var/sentora/hostdata"
php_admin_value open_basedir "/var/sentora/hostdata:/var/sentora/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
AliasMatch ^/~([a-zA-Z0-9]+)/?(.*) /var/sentora/hostdata/$1/public_html/$2
<Directory /var/sentora/hostdata>
Options FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir /var/sentora/temp
</IfModule>
</Directory>Code: </virtualhost>
# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName xxx.xxx.xxx.xxx
DocumentRoot "/var/sentora/hostdata"
php_admin_value open_basedir "/var/sentora/hostdata:/var/sentora/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
AliasMatch ^/~([a-zA-Z0-9]+)/?(.*) /var/sentora/hostdata/$1/public_html/$2
<Directory /var/sentora/hostdata>
Options FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir /var/sentora/temp
</IfModule>
</Directory>Need to replace xxx.xxx.xxx.xxx with your server's public IP. You enter this as a Global ZPanel/Sentora Entry in Module Admin>Apache Admin This could be customized to use your main panel domain instead of IP Example usage: http://75.68.13.153/~sscms/supersimplecms_tk/ RE: [HOW-TO] DNS-Less preview - Me.B - 01-29-2015 Adding entries to own host file & forcing it to bind IP to domain is faster trick & won't mess up your domain config. https://kb.mediatemple.net/questions/61/How+can+I+test+or+preview+my+website+before+switching+DNS%3F#gs RE: [HOW-TO] DNS-Less preview - Ron-e - 04-01-2015 My Linux version of TGates DNS-less preview with server IP instead of special (sub) domain. (tested on CentOS 6.6) In Sentora go to "Server Admin" > "Module Admin" > "Apache Config" and copy&paste the code below in "Global Sentora Entry". Select "Force Update" at the bottom and save. Run the daemon manually (php -q /etc/sentora/panel/bin/daemon.php) to speed things up. And it should work, hopefully. ![]() Code: </virtualhost>
# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName xxx.xxx.xxx.xxx
DocumentRoot "/var/sentora/hostdata"
php_admin_value open_basedir "/var/sentora/hostdata:/var/sentora/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
AliasMatch ^/~([a-zA-Z0-9]+)/?(.*) /var/sentora/hostdata/$1/public_html/$2
<Directory /var/sentora/hostdata>
Options FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir /var/sentora/temp
</IfModule>
</Directory>Replace xxx.xxx.xxx.xxx with your server ip. RE: [HOW-TO] DNS-Less preview - Ron-e - 04-11-2015 If you don't like indexing when they go to your IP (which can be a security risk i think). Like a list of all users: ![]() You need to change the line: Code: Options FollowSymLinks IndexesTo: Code: Options FollowSymLinksDon't forget to select "Force Update" at the bottom and to run the daemon manually (php -q /etc/sentora/panel/bin/daemon.php) to speed things up. RE: [HOW-TO] DNS-Less preview - txt3rob - 06-24-2015 i've done this but get a 403 error no matter what i changed the ip to my servers ip as well RE: [HOW-TO] DNS-Less preview - Ron-e - 06-24-2015 (06-24-2015, 06:17 PM)txt3rob Wrote: i've done this but get a 403 error no matter what If you go only to the IP of your server you get indeed a 403, but if you go to the url like in the exemple from TGates you will see the website. (01-29-2015, 09:06 AM)TGates Wrote: Example usage: http://75.68.13.153/~zadmin/mach-hosting_com/ Change "zadmin" to the user from the domain you like to see, and change "mach-hosting_com" to the domain(directory) you like to see. RE: [HOW-TO] DNS-Less preview - Ron-e - 06-24-2015 If you like to see a website when you enter your server IP you can change the following line: Code: DocumentRoot "/var/sentora/hostdata"with the directory from the website you like to see when someone enters only your IP like so: Code: DocumentRoot "/var/sentora/hostdata/zadmin/public_html/forward_auxio_eu"The DNS-less urls will still work like normal.. RE: [HOW-TO] DNS-Less preview - yarrha - 07-28-2015 (04-01-2015, 04:37 AM)Ron-e Wrote: My Linux version of TGates DNS-less preview with server IP instead of special (sub) domain. (tested on CentOS 6.6) I have tried it on my server. Unfortunately apache fails to restart: AH00526: Syntax error on line 31 of /etc/sentora/configs/apache/httpd-vhosts.conf: Invalid command '\xc2\xa0', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. Syntax error on line 31 is related to Server Name. Looking forward for any feedback on this problem. RE: [HOW-TO] DNS-Less preview - Ron-e - 07-29-2015 Just guessing in the blank.. Have you started with the "</virtualhost>" tag and ended with the "</Directory>" tag? Or maybe post your httpd-vhosts.conf file here so we can try to find the problem. RE: [HOW-TO] DNS-Less preview - yarrha - 07-29-2015 I have succeeded to get DNS preview. For review please check this one https://199.180.116.69/~nitipinf/nitip_info/ Using global sentora entry will not work. I configure the httpd config file as informed in https://github.com/sentora/sentora-core/issues/104#issuecomment-71953710 After you add the code given, you will get error 403 which forbid you to access the web page. So, add new codes below the code given like this: Quote:ServerName localhost (IP address seems not working on my server so I use localhost) |