Posts: 143
Threads: 25
Joined: Aug 2014
Reputation:
4
Sex: Male
Thanks: 46
Given 14 thank(s) in 10 post(s)
how to preview a domain not pointed yet to sentora?
04-01-2015, 12:11 AM
Hi there.
I search on this forum for this topic but there is none. Here is my question. How can we preview a domain name that is not pointed yet to our sentora control panel but is created inside of it. That's one of the things i can use on other control panels. Is there any way to look in to a TLD this way?
Thanks in advance!
Posts: 683
Threads: 40
Joined: Jul 2014
Reputation:
29
Sex: Male
Thanks: 96
Given 205 thank(s) in 159 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 12:43 AM
(This post was last modified: 04-01-2015, 12:45 AM by Ron-e.)
You mean this??
Also check this topic on DNS-less previews.
Posts: 143
Threads: 25
Joined: Aug 2014
Reputation:
4
Sex: Male
Thanks: 46
Given 14 thank(s) in 10 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 03:07 AM
@Ron-e,
Yeah that is perfect! Great solution. Thanks a lot!
Posts: 143
Threads: 25
Joined: Aug 2014
Reputation:
4
Sex: Male
Thanks: 46
Given 14 thank(s) in 10 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 03:15 AM
@Ron-e,
I get a 404... Is there any way to show a public link such as this for example?
http://123.456.78.9/~user/domain_net/
I need a public preview for the domain name in question.
Thanks in advance
Posts: 683
Threads: 40
Joined: Jul 2014
Reputation:
29
Sex: Male
Thanks: 96
Given 205 thank(s) in 159 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 03:53 AM
About the 404:
What did you add as custom Vhost?
Which CentOs version do you use 6/7?
Posts: 143
Threads: 25
Joined: Aug 2014
Reputation:
4
Sex: Male
Thanks: 46
Given 14 thank(s) in 10 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 03:57 AM
@Ron-e,
Thanks for your help, i am using CentOs 6 (minimal version) and i have not added nothing as custom Vhost.
Posts: 683
Threads: 40
Joined: Jul 2014
Reputation:
29
Sex: Male
Thanks: 96
Given 205 thank(s) in 159 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 04:13 AM
(This post was last modified: 05-30-2015, 12:52 AM by Ron-e.)
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 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.
Posts: 683
Threads: 40
Joined: Jul 2014
Reputation:
29
Sex: Male
Thanks: 96
Given 205 thank(s) in 159 post(s)
RE: how to preview a domain not pointed yet to sentora?
04-01-2015, 04:28 AM
(This post was last modified: 05-30-2015, 12:52 AM by Ron-e.)
New version with open_basedir which is more secure..
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.
Posts: 2
Threads: 0
Joined: Jun 2015
Reputation:
0
Thanks: 0
Given 0 thank(s) in 0 post(s)
RE: how to preview a domain not pointed yet to sentora?
06-11-2015, 04:49 PM
(04-01-2015, 04:28 AM)Hi ,Not work for me, i´m using Ubuntu 14.04 on Amazon EC2 Instance with Elastic IP and when reboot the instance i get this error ForbiddenYou don\t have permission to access / on this server.I tried with Elastic IP and Private Ip and nothing, do you have another idea ?This instructions works for last version of sentora ? 1.0.0Waiting your reply !!ThanksRon-e Wrote: New version with open_basedir which is more secure..
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.
Posts: 143
Threads: 25
Joined: Aug 2014
Reputation:
4
Sex: Male
Thanks: 46
Given 14 thank(s) in 10 post(s)
RE: how to preview a domain not pointed yet to sentora?
07-08-2016, 01:27 PM
Guys thank you so much it works perfectly i am really happy now!
|