How to stop and restart Apache

Please post questions about add-ons for legacy ReadyNAS devices here.

How to stop and restart Apache

Postby michelefaccini » Sat Oct 01, 2011 3:21 am

Hi,I have PHP 5.3.8.1 and phpMyadmin 3.3.8.1 installed on my ReadyNas Ultra 2...I would like to know what is correct synthax to use( in the SQL query page of phpMyadmin ) to stop and restart Apache without having to reboot the Nas.....I already tried some but always get a synthax error....
Nas : Ultra 2 Plus
Network : Netgear DGN2200
Desktop : QuadCore I7 950 3.02 GHZ,2 SSD OCZ Vertex4 Raid 0, 1 SSD OCZ Vertex Turbo 60 GB, Gigabyte X58A UD5 Rev2 Bios FD, CORSAIR Vengeance 12 GB DDR3 1600 or OCZ Platinum LV 6GB DDR3 1600 MHz, Thermaltake Armor + Black, Sapphire Radeon 5830 1GB DDR5, Zalmann CNPS9900 Max, Corsair 750 Watts TX
OS : Windows 7 64 Bit Ultimate.
Virtualized with VirtualBox and/or with VMWare : Ubuntu - Fedora 15 - Windows XP -Windows NT 4.0 - Windows 2000 Pro - NextStep 3.3 - Mac OS X Snow Leopard - OpenStep - Windows 7 64 Bit Ultimate - Windows 8.1 Pro - Fedora 15 64 bit - ReadyNAS OS 6 - RAIDiator-4.2.23
michelefaccini
Advanced ReadyNAS User
 
Posts: 153
Joined: Mon Jun 27, 2011 9:17 am
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby GaWd » Sun Oct 02, 2011 4:27 pm

Not sure about the web interface to PHPMyAdmin, since I still can't get mine configured correclty (see my question to you in your other thread), but there is a script that can be executed from CLI that will take care of the problem:

/etc/frontview/addons/bin/PHP5/restart_apache.sh
GaWd
ReadyNAS User
 
Posts: 52
Joined: Fri Apr 01, 2011 6:57 am

How to stop and restart Apache

Postby WhoCares? » Sun Oct 02, 2011 6:12 pm

The correct syntax would be
Code: Select all
apache-ssl -f /etc/frontview/apache/httpd.conf -k restart

which essentially is what the restart_apache.sh script is doing - but it has a 30 or so seconds delay built in.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2960
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: How to stop and restart Apache

Postby michelefaccini » Mon Oct 03, 2011 7:16 am

I get the following error :

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'apache-ssl -f /etc/frontview/apache/httpd.conf -k restart' at line 1
Nas : Ultra 2 Plus
Network : Netgear DGN2200
Desktop : QuadCore I7 950 3.02 GHZ,2 SSD OCZ Vertex4 Raid 0, 1 SSD OCZ Vertex Turbo 60 GB, Gigabyte X58A UD5 Rev2 Bios FD, CORSAIR Vengeance 12 GB DDR3 1600 or OCZ Platinum LV 6GB DDR3 1600 MHz, Thermaltake Armor + Black, Sapphire Radeon 5830 1GB DDR5, Zalmann CNPS9900 Max, Corsair 750 Watts TX
OS : Windows 7 64 Bit Ultimate.
Virtualized with VirtualBox and/or with VMWare : Ubuntu - Fedora 15 - Windows XP -Windows NT 4.0 - Windows 2000 Pro - NextStep 3.3 - Mac OS X Snow Leopard - OpenStep - Windows 7 64 Bit Ultimate - Windows 8.1 Pro - Fedora 15 64 bit - ReadyNAS OS 6 - RAIDiator-4.2.23
michelefaccini
Advanced ReadyNAS User
 
Posts: 153
Joined: Mon Jun 27, 2011 9:17 am
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby sphardy » Mon Oct 03, 2011 7:22 am

Are you entering the command while logged in to mysql???

NAS: Ultra-4, NV+ & Duo v2 :: ST31500341AS & HDS723020BLA642 Drives
Network: Netgear GS108Tv2 / DM111P :: Airport Extreme / Express & Time Capsule
Clients: OS X 10.6 - 10.8 :: Ubuntu 11.x :: Win 7 + SP#1
UPS: APC ES-550

Image
User avatar
sphardy
ReadyNAS Junkie
 
Posts: 4626
Joined: Thu Feb 28, 2008 3:34 am
Location: France
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby michelefaccini » Mon Oct 03, 2011 7:26 am

From phpMyadmin.....
Nas : Ultra 2 Plus
Network : Netgear DGN2200
Desktop : QuadCore I7 950 3.02 GHZ,2 SSD OCZ Vertex4 Raid 0, 1 SSD OCZ Vertex Turbo 60 GB, Gigabyte X58A UD5 Rev2 Bios FD, CORSAIR Vengeance 12 GB DDR3 1600 or OCZ Platinum LV 6GB DDR3 1600 MHz, Thermaltake Armor + Black, Sapphire Radeon 5830 1GB DDR5, Zalmann CNPS9900 Max, Corsair 750 Watts TX
OS : Windows 7 64 Bit Ultimate.
Virtualized with VirtualBox and/or with VMWare : Ubuntu - Fedora 15 - Windows XP -Windows NT 4.0 - Windows 2000 Pro - NextStep 3.3 - Mac OS X Snow Leopard - OpenStep - Windows 7 64 Bit Ultimate - Windows 8.1 Pro - Fedora 15 64 bit - ReadyNAS OS 6 - RAIDiator-4.2.23
michelefaccini
Advanced ReadyNAS User
 
Posts: 153
Joined: Mon Jun 27, 2011 9:17 am
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby sphardy » Mon Oct 03, 2011 7:38 am

phpmyadmin is a graphical frontend for managing MySQL databases - not for controlling your NAS.

The command needs to be entered at the Linux command line ie via SSH

NAS: Ultra-4, NV+ & Duo v2 :: ST31500341AS & HDS723020BLA642 Drives
Network: Netgear GS108Tv2 / DM111P :: Airport Extreme / Express & Time Capsule
Clients: OS X 10.6 - 10.8 :: Ubuntu 11.x :: Win 7 + SP#1
UPS: APC ES-550

Image
User avatar
sphardy
ReadyNAS Junkie
 
Posts: 4626
Joined: Thu Feb 28, 2008 3:34 am
Location: France
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby michelefaccini » Mon Oct 03, 2011 7:45 am

Logged as root (+ password) from the Putty shell, I have

apache-ssl: Could not reliably determine the server's fully qualified domain name, using 192.168.0.2 for ServerName
Nas : Ultra 2 Plus
Network : Netgear DGN2200
Desktop : QuadCore I7 950 3.02 GHZ,2 SSD OCZ Vertex4 Raid 0, 1 SSD OCZ Vertex Turbo 60 GB, Gigabyte X58A UD5 Rev2 Bios FD, CORSAIR Vengeance 12 GB DDR3 1600 or OCZ Platinum LV 6GB DDR3 1600 MHz, Thermaltake Armor + Black, Sapphire Radeon 5830 1GB DDR5, Zalmann CNPS9900 Max, Corsair 750 Watts TX
OS : Windows 7 64 Bit Ultimate.
Virtualized with VirtualBox and/or with VMWare : Ubuntu - Fedora 15 - Windows XP -Windows NT 4.0 - Windows 2000 Pro - NextStep 3.3 - Mac OS X Snow Leopard - OpenStep - Windows 7 64 Bit Ultimate - Windows 8.1 Pro - Fedora 15 64 bit - ReadyNAS OS 6 - RAIDiator-4.2.23
michelefaccini
Advanced ReadyNAS User
 
Posts: 153
Joined: Mon Jun 27, 2011 9:17 am
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby WhoCares? » Mon Oct 03, 2011 7:50 am

Yeah, that's normal, nothing to worry about.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2960
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: How to stop and restart Apache

Postby michelefaccini » Mon Oct 03, 2011 7:59 am

So is the command been executed ?
Nas : Ultra 2 Plus
Network : Netgear DGN2200
Desktop : QuadCore I7 950 3.02 GHZ,2 SSD OCZ Vertex4 Raid 0, 1 SSD OCZ Vertex Turbo 60 GB, Gigabyte X58A UD5 Rev2 Bios FD, CORSAIR Vengeance 12 GB DDR3 1600 or OCZ Platinum LV 6GB DDR3 1600 MHz, Thermaltake Armor + Black, Sapphire Radeon 5830 1GB DDR5, Zalmann CNPS9900 Max, Corsair 750 Watts TX
OS : Windows 7 64 Bit Ultimate.
Virtualized with VirtualBox and/or with VMWare : Ubuntu - Fedora 15 - Windows XP -Windows NT 4.0 - Windows 2000 Pro - NextStep 3.3 - Mac OS X Snow Leopard - OpenStep - Windows 7 64 Bit Ultimate - Windows 8.1 Pro - Fedora 15 64 bit - ReadyNAS OS 6 - RAIDiator-4.2.23
michelefaccini
Advanced ReadyNAS User
 
Posts: 153
Joined: Mon Jun 27, 2011 9:17 am
ReadyNAS: Ultra

Re: How to stop and restart Apache

Postby WhoCares? » Mon Oct 03, 2011 8:02 am

Yes, you can verify using "ps ax | grep apache" (without the quotes.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2960
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro


Return to General Discussion on ReadyNAS Add-ons for Legacy ReadyNAS



Who is online

Users browsing this forum: No registered users and 6 guests