22 ноября 2016 г.

Apache Перенаправление HTTP на HTTPS с использованием mod_rewrite

mod_rewrite Апача позволяет легко требовать SSL для использования на вашем сайте , и мягко перенаправить пользователей , которые забыли добавить протокол HTTPS при вводе URL. 
Использование Apache для перенаправления HTTP на HTTPS будет убедиться , что ваш сайт (или его часть) будет доступен только для Ваших клиентов с помощью SSL. Это лучше , чем при использовании SSLRequireSSL , так как пользователи часто забывают набрать в протокол HTTPS и будет автоматически перенаправлен.
Перед тем, как можно настроить Apache перенаправление с HTTP на HTTPS, вам нужно будет сделать следующее:
  • Убедитесь , что сертификат SSL был успешно установлен , так что вы можете получить доступ кhttps://www.yoursite.com (для получения дополнительной информации см наши инструкции поустановке Apache SSL )
  • Убедитесь, что mod_rewrite включен в Apache
Теперь вам просто нужно отредактировать файл httpd.conf или файл, в котором указан ваш виртуальный хост и добавить эти строки в переадресации HTTP на HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/%$1 [R,L]
Во многих случаях, вы можете просто добавить эти строки в файл с именем .htaccess в папке, которую вы хотите перенаправить HTTP на HTTPS.
Теперь, когда посетитель вводит http://www.yoursite.com/mypage.htm~~V сервер автоматически перенаправляет HTTP для HTTPS, так что они идут в https://www.yoursite.com/mypage.htm
Примечание: Можно также перенаправить одну страницу от HTTP для HTTP в Apache, используя это в вашем конфигурационном файле или файле .htaccess:
RewriteEngine On
RewriteRule ^apache-redirect-http-to-https\.html$ https://www.yoursite.com/apache-redirect-http-to-https.html [R=301,L]

7 ноября 2016 г.

Mobile-first Indexing

Official Google Webmaster Central Blog

Link to Google Webmaster Central Blog


Posted: 04 Nov 2016 10:12 AM PDT
Today, most people are searching on Google using a mobile device. However, our ranking systems still typically look at the desktop version of a page’s content to evaluate its relevance to the user. This can cause issues when the mobile page has less content than the desktop page because our algorithms are not evaluating the actual page that is seen by a mobile searcher.
To make our results more useful, we’ve begun experiments to make our index mobile-first. Although our search index will continue to be a single index of websites and apps, our algorithms will eventually primarily use the mobile version of a site’s content to rank pages from that site, to understand structured data, and to show snippets from those pages in our results. Of course, while our index will be built from mobile documents, we're going to continue to build a great search experience for all users, whether they come from mobile or desktop devices.
We understand this is an important shift in our indexing and it’s one we take seriously. We’ll continue to carefully experiment over the coming months on a small scale and we’ll ramp up this change when we’re confident that we have a great user experience. Though we’re only beginning this process, here are a few recommendations to help webmasters prepare as we move towards a more mobile-focused index.
  • If you have a responsive site or a dynamic serving site where the primary content and markup is equivalent across mobile and desktop, you shouldn’t have to change anything.
  • If you have a site configuration where the primary content and markup is different across mobile and desktop, you should consider making some changes to your site.
    • Make sure to serve structured markup for both the desktop and mobile version.

      Sites can verify the equivalence of their structured markup across desktop and mobile by typing the URLs of both versions into the Structured Data Testing Tool and comparing the output.

      When adding structured data to a mobile site, avoid adding large amounts of markup that isn’t relevant to the specific information content of each document.
    • Use the robots.txt testing tool to verify that your mobile version is accessible to Googlebot. 
    • Sites do not have to make changes to their canonical links; we’ll continue to use these links as guides to serve the appropriate results to a user searching on desktop or mobile.
  • If you are a site owner who has only verified their desktop site in Search Console, please add and verify your mobile version.
  • If you only have a desktop site, we'll continue to index your desktop site just fine, even if we're using a mobile user agent to view your site.

    If you are building a mobile version of your site, keep in mind that a functional desktop-oriented site can be better than a broken or incomplete mobile version of the site. It's better for you to build up your mobile site and launch it when ready.  
If you have any questions, feel free to contact us via the Webmaster forums or our public events. We anticipate this change will take some time and we’ll update you as we make progress on migrating our systems.

Posted by Doantam Phan, Product Manager

5 ноября 2016 г.

Как получить Root права пользователя Mac OS Sierra?

Включение корневого пользователя в MacOS Sierra

После обновления операционной системы Mac OS X до Sierra 10.12 первым делом для учетной записи нужно активировать права корневого пользователя, которые по умолчанию отключены.

Открываем «Системные настройки» в меню Apple и запускаем панель «Пользователи и группы»                            


Выполняем следующие действия:
  1. Открываем замок внизу слева и вводим пароль
  2. Выбираем учетную запись текущего пользователя
  3. Задаем «Параметры входа» для этой уч. записи
  4. Нажимаем кнопку «Подключить сетевой сервер»
  5. Выбираем «Открыть службу каталогов»
























Настройка подключения к серверу учетных записей:

  1. Выполняем первичную аутентификацию учетной записи
  2. Выбираем Сетевые Информационные Службы (NIS) как это работает?
  3. Дважды вводим пароль, чтобы включить корневого пользователя

Настройки корневого пользователя macOS Sierra выполнены.

Список доступных доверенных корневых сертификатов в MacOS Sierra.