- Desde
- 24 Sep 2013
- Mensajes
- 32
Hola, tengo un vps en hostinger, usa vestacp, el sistema operativo es debian 7 x64.
mi dominio es:
portfolio.rollsroyce-maintenance.xyz
El problema es que woorank me dice que no tiene configurada una redirección 301, que se puede acceder con www o sin www.
pues bien si pongo www.portfolio.rollsroyce-maintenance.xyz chrome me dice
Ya he probado poniendo en nginx.conf lo siguiente:
Dejo aquí lo que tengo en nginx.conf ubicado en /home/admin/conf/web
Y esto es lo que tengo en apache.conf
Esto es lo que tengo en el .htacces ubicado en /home/admin/web/portfolio.rollsroyce-maintenance.xyz/public_html
Así que no tengo idea por donde empezar, no sé quien tiene la autoridad para hacer la redireccion, si el .htacces o el nginx.conf o el apache.conf
Saludos y gracias desde yá
mi dominio es:
portfolio.rollsroyce-maintenance.xyz
El problema es que woorank me dice que no tiene configurada una redirección 301, que se puede acceder con www o sin www.
pues bien si pongo www.portfolio.rollsroyce-maintenance.xyz chrome me dice
No se ha podido encontrar la dirección IP del servidor de www.portfolio.rollsroyce-maintenance.xyz.
Ya he probado poniendo en nginx.conf lo siguiente:
Insertar CODE, HTML o PHP:
server {
listen 80;
server_name www.portfolio.rollsroyce-maintenance.xyz;
rewrite ^/(.*)$ http://portfolio.rollsroyce-maintenance.xyz/$1 permanent;
}
Dejo aquí lo que tengo en nginx.conf ubicado en /home/admin/conf/web
Insertar CODE, HTML o PHP:
add_header Strict-Transport-Security "max-age=10886400";
server {
server_name rollsroyce-maintenance.xyz www.rollsroyce-maintenance.xyz;
error_log /var/log/apache2/domains/rollsroyce-maintenance.xyz.error.log error;
location / {
proxy_pass http://93.188.167.38:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
root /home/admin/web/rollsroyce-maintenance.xyz/public_html;
access_log /var/log/apache2/domains/rollsroyce-maintenance.xyz.log combined;
access_log /var/log/apache2/domains/rollsroyce-maintenance.xyz.bytes bytes;
expires max;
try_files $uri [MENTION=110953]fall[/MENTION]back;
}
}
location /error/ {
alias /home/admin/web/rollsroyce-maintenance.xyz/document_errors/;
}
location [MENTION=110953]fall[/MENTION]back {
proxy_pass [url]http://93.188.167.38:8080;[/url]
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/nginx.rollsroyce-maintenance.xyz.conf*;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/api-marvel.ml/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/api-marvel.ml/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name api-marvel.ml [url]www.api-marvel.ml;[/url]
error_log /var/log/apache2/domains/api-marvel.ml.error.log error;
location / {
proxy_pass [url]http://93.188.167.38:8080;[/url]
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
root /home/admin/web/api-marvel.ml/public_html;
access_log /var/log/apache2/domains/api-marvel.ml.log combined;
access_log /var/log/apache2/domains/api-marvel.ml.bytes bytes;
expires max;
try_files $uri [MENTION=110953]fall[/MENTION]back;
}
}
location /error/ {
alias /home/admin/web/api-marvel.ml/document_errors/;
}
location [MENTION=110953]fall[/MENTION]back {
proxy_pass [url]http://93.188.167.38:8080;[/url]
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/nginx.api-marvel.ml.conf*;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/api-marvel.ml/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/api-marvel.ml/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name portfolio.rollsroyce-maintenance.xyz [url]www.portfolio.rollsroyce-maintenance.xyz;[/url]
error_log /var/log/apache2/domains/portfolio.rollsroyce-maintenance.xyz.error.log error;
location / {
proxy_pass [url]http://93.188.167.38:8080;[/url]
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
root /home/admin/web/portfolio.rollsroyce-maintenance.xyz/public_html;
access_log /var/log/apache2/domains/portfolio.rollsroyce-maintenance.xyz.log combined;
access_log /var/log/apache2/domains/portfolio.rollsroyce-maintenance.xyz.bytes bytes;
expires max;
try_files $uri [MENTION=110953]fall[/MENTION]back;
}
}
location /error/ {
alias /home/admin/web/portfolio.rollsroyce-maintenance.xyz/document_errors/;
}
location [MENTION=110953]fall[/MENTION]back {
proxy_pass [url]http://93.188.167.38:8080;[/url]
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/nginx.portfolio.rollsroyce-maintenance.xyz.conf*;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/api-marvel.ml/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/api-marvel.ml/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = api-marvel.ml) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 93.188.167.38:80;
server_name api-marvel.ml [url]www.api-marvel.ml;[/url]
return 404; # managed by Certbot
}server {
if ($host = rollsroyce-maintenance.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 93.188.167.38:80;
server_name rollsroyce-maintenance.xyz [url]www.rollsroyce-maintenance.xyz;[/url]
return 404; # managed by Certbot
}
#server {
# if ($host = portfolio.rollsroyce-maintenance.xyz) {
# return 301 https://$host$request_uri;
#} # managed by Certbot
# listen 93.188.167.38:80;
# server_name portfolio.rollsroyce-maintenance.xyz [url]www.portfolio.rollsroyce-maintenance.xyz;[/url]
# return 404; # managed by Certbot
#}
server {
listen 93.188.167.38:80;
server_name [url]www.portfolio.rollsroyce-maintenance.xyz;[/url]
rewrite ^/(.*)$ http://portfolio.rollsroyce-maintenance.xyz/$1 permanent;
}
Y esto es lo que tengo en apache.conf
Insertar CODE, HTML o PHP:
<VirtualHost 93.188.167.38:8080>
ServerName rollsroyce-maintenance.xyz
ServerAlias www.rollsroyce-maintenance.xyz
ServerAdmin info@rollsroyce-maintenance.xyz
DocumentRoot /home/admin/web/rollsroyce-maintenance.xyz/public_html
ScriptAlias /cgi-bin/ /home/admin/web/rollsroyce-maintenance.xyz/cgi-bin/
Alias /vstats/ /home/admin/web/rollsroyce-maintenance.xyz/stats/
Alias /error/ /home/admin/web/rollsroyce-maintenance.xyz/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/rollsroyce-maintenance.xyz.bytes bytes
CustomLog /var/log/apache2/domains/rollsroyce-maintenance.xyz.log combined
ErrorLog /var/log/apache2/domains/rollsroyce-maintenance.xyz.error.log
<Directory /home/admin/web/rollsroyce-maintenance.xyz/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/rollsroyce-maintenance.xyz/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/rollsroyce-maintenance.xyz/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
Include /home/admin/conf/web/apache2.rollsroyce-maintenance.xyz.conf*
</VirtualHost>
<VirtualHost 93.188.167.38:8080>
ServerName api-marvel.ml
ServerAlias www.api-marvel.ml
ServerAdmin info@api-marvel.ml
DocumentRoot /home/admin/web/api-marvel.ml/public_html
ScriptAlias /cgi-bin/ /home/admin/web/api-marvel.ml/cgi-bin/
Alias /vstats/ /home/admin/web/api-marvel.ml/stats/
Alias /error/ /home/admin/web/api-marvel.ml/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/api-marvel.ml.bytes bytes
CustomLog /var/log/apache2/domains/api-marvel.ml.log combined
ErrorLog /var/log/apache2/domains/api-marvel.ml.error.log
<Directory /home/admin/web/api-marvel.ml/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/api-marvel.ml/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/api-marvel.ml/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
Include /home/admin/conf/web/apache2.api-marvel.ml.conf*
</VirtualHost>
<VirtualHost 93.188.167.38:8080>
ServerName portfolio.rollsroyce-maintenance.xyz
ServerAlias www.portfolio.rollsroyce-maintenance.xyz
ServerAdmin info@portfolio.rollsroyce-maintenance.xyz
DocumentRoot /home/admin/web/portfolio.rollsroyce-maintenance.xyz/public_html
ScriptAlias /cgi-bin/ /home/admin/web/portfolio.rollsroyce-maintenance.xyz/cgi-bin/
Alias /vstats/ /home/admin/web/portfolio.rollsroyce-maintenance.xyz/stats/
Alias /error/ /home/admin/web/portfolio.rollsroyce-maintenance.xyz/document_errors/
#SuexecUserGroup admin admin
CustomLog /var/log/apache2/domains/portfolio.rollsroyce-maintenance.xyz.bytes bytes
CustomLog /var/log/apache2/domains/portfolio.rollsroyce-maintenance.xyz.log combined
ErrorLog /var/log/apache2/domains/portfolio.rollsroyce-maintenance.xyz.error.log
<Directory /home/admin/web/portfolio.rollsroyce-maintenance.xyz/public_html>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir /home/admin/web/portfolio.rollsroyce-maintenance.xyz/public_html:/home/admin/tmp
php_admin_value upload_tmp_dir /home/admin/tmp
php_admin_value session.save_path /home/admin/tmp
</Directory>
<Directory /home/admin/web/portfolio.rollsroyce-maintenance.xyz/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid admin admin
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID admin admin
</IfModule>
Include /home/admin/conf/web/apache2.portfolio.rollsroyce-maintenance.xyz.conf*
</VirtualHost>
Esto es lo que tengo en el .htacces ubicado en /home/admin/web/portfolio.rollsroyce-maintenance.xyz/public_html
Insertar CODE, HTML o PHP:
Options +FollowSymlinks
RewriteEngine on
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www.portfolio.rollsroyce-maintenance.xyz [NC]
RewriteRule (.*) https://portfolio.rollsroyce-maintenance.xyz/$1 [R=301,L,QSA]
</IfModule>
ErrorDocument 404 https://portfolio.rollsroyce-maintenance.xyz/404.html
Así que no tengo idea por donde empezar, no sé quien tiene la autoridad para hacer la redireccion, si el .htacces o el nginx.conf o el apache.conf
Saludos y gracias desde yá