• 23-10-2019, 15:46:29
    #1
    merhaba,

    Uzun zamandır google cloud sunucularını kullanıyorum. Ancak bugün conf dosyasında bir kaç düzenleme yapmam gerekti. Sonrasında http servisini başlatmak istediğimde hata alıyorum.

    [root@plsk-cent-byol-gcp-m-1-vm conf]# sudo service httpd status
    Redirecting to /bin/systemctl status httpd.service
    ● httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Wed 2019-10-23 12:29:16 UTC; 19min ago
    Docs: man:httpd(8)
    man:apachectl(8)
    Process: 29663 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
    Process: 29661 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 29661 (code=exited, status=1/FAILURE)
    
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm systemd[1]: Starting The Apache HTTP Server...
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm httpd[29661]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/...e section
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm kill[29663]: kill: cannot find process ""
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm systemd[1]: httpd.service: control process exited, code=exited status=1
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm systemd[1]: Failed to start The Apache HTTP Server.
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm systemd[1]: Unit httpd.service entered failed state.
    Oct 23 12:29:16 plsk-cent-byol-gcp-m-1-vm systemd[1]: httpd.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.
    Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

    Nasıl bir yol izleyebilirim?
  • 23-10-2019, 15:52:34
    #2
    Kurumsal PLUS
    /etc/httpd/conf/httpd.conf bu dosyanın 353. satırında syntax hatası mevcut.

    Paylaşırsanız yardımcı olmaya çalışalım.
  • 23-10-2019, 15:55:23
    #3
    include edilen/etc/httpd/conf.d/*dosyalarının birinde syntax error var 7.satır bizimle paylaşırsan yardımcı olabiliriz./etc/httpd/conf/httpd.confdosyasının 353. satırında muhtemelen include kodu var.
  • 23-10-2019, 16:09:35
    #4
    @SiberWorld; @picpoket;

    353. satır bold olan bölüm. > IncludeOptional conf.d/*.conf

    #
    # EnableMMAP and EnableSendfile: On systems that support it,
    # memory-mapping or the sendfile syscall may be used to deliver
    # files. This usually improves server performance, but must
    # be turned off when serving from networked-mounted
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    # Defaults if commented: EnableMMAP On, EnableSendfile Off
    #
    #EnableMMAP off
    EnableSendfile on
    
    # Supplemental configuration
    #
    # Load config files in the "/etc/httpd/conf.d" directory, if any.
    IncludeOptional conf.d/*.conf
    GracefulShutDownTimeout 3
    AddOutputFilter INCLUDES .shtml
    AddType text/html .shtml
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
  • 23-10-2019, 17:00:28
    #5
    Kimlik doğrulama veya yönetimden onay bekliyor.
    sed -i '353s/^/#/' /etc/httpd/conf/httpd.conf

    Daha sonra httpd servisini yeniden başlatın.
  • 23-10-2019, 17:02:20
    #6
    picpoket adlı üyeden alıntı: mesajı görüntüle
    include edilen/etc/httpd/conf.d/*dosyalarının birinde syntax error var 7.satır bizimle paylaşırsan yardımcı olabiliriz./etc/httpd/conf/httpd.confdosyasının 353. satırında muhtemelen include kodu var.
    AndyCap adlı üyeden alıntı: mesajı görüntüle
    sed -i '353s/^/#/' /etc/httpd/conf/httpd.conf

    Daha sonra httpd servisini yeniden başlatın.

    Anlamadım hocam bu verdiğinizi mi çalıştıracağım
  • 23-10-2019, 17:16:44
    #7
    353. satırda önce farklı birşey paylaştınız html kodları içeren. Bende ona göre birşey yazdım size. Daha sonra düzenlemişsiniz. Son hali nedir ilgili satırın?
  • 23-10-2019, 17:26:43
    #8
    AndyCap adlı üyeden alıntı: mesajı görüntüle
    353. satırda önce farklı birşey paylaştınız html kodları içeren. Bende ona göre birşey yazdım size. Daha sonra düzenlemişsiniz. Son hali nedir ilgili satırın?
    Şimdi uyguladım, servis çalıştı okey duruma geldi. Boyle dosyamız ama başka bir sorun var sanırım şuan. sitem çalışmıyor (alt bağlantılar, anasayfada dosyalar eksik gibi anlamadım )

    # Supplemental configuration
    #
    # Load config files in the "/etc/httpd/conf.d" directory, if any.
    #IncludeOptional conf.d/*.conf
    GracefulShutDownTimeout 3
    AddOutputFilter INCLUDES .shtml
    AddType text/html .shtml
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
  • 23-10-2019, 17:39:06
    #9
    akafo adlı üyeden alıntı: mesajı görüntüle
    Şimdi uyguladım, servis çalıştı okey duruma geldi. Boyle dosyamız ama başka bir sorun var sanırım şuan. sitem çalışmıyor (alt bağlantılar, anasayfada dosyalar eksik gibi anlamadım )

    # Supplemental configuration
    #
    # Load config files in the "/etc/httpd/conf.d" directory, if any.
    #IncludeOptional conf.d/*.conf
    GracefulShutDownTimeout 3
    AddOutputFilter INCLUDES .shtml
    AddType text/html .shtml
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    #IncludeOptional conf.d/*.conf başındaki # işaretini kaldırın.

    Sorun ilk paylaştığınız config ile son paylaştığınızın aynı olmaması. Ben ilk duruma göre bir sed oluşturdum. Mesajlarda düzenleme yaptığınızda, düzenleme sebebinizi belirtirseniz, daha kolay çözüm üretiriz.